Reputation: 3881
I have been following some basic tutorials for dotnet
with Raspbian
They state:
export DOTNET_ROOT=$HOME/dotnet-arm32
export PATH=$PATH:$HOME/dotnet-arm32
However, when I reboot these are lost. After some reading I found that adding PATH=$PATH:$HOME/dotnet-arm32
to my ~/.profile
solved the dotnet
command issue, but the DOTNET_ROOT
does not work. I have to run export DOTNET_ROOT=$HOME/dotnet-arm32
once I've rebooted to get a project to run.
This is what my ~/.profile
looks like at the bottom of the file.
# set PATH to dotnet
PATH="$PATH:$HOME/dotnet-arm32"
# set ENV for runtime
DOTNET_ROOT="$HOME/dotnet-arm32"
Upvotes: 1
Views: 1177
Reputation: 15223
You need to export the variables:
# set PATH to dotnet
export PATH="$PATH:$HOME/dotnet-arm32"
# set ENV for runtime
export DOTNET_ROOT="$HOME/dotnet-arm32"
PATH
was already an exported variable, so not exporting it doesn't make a difference. But DOTNET_ROOT
is treated as a local variable in .profile unless it's exported explicitly.
Upvotes: 1