Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5944

Bash: Command not found even though it's added to PATH

$
0
0

I want to install dotnet to root on a linux vm and be able to run the dotnet with just a

sudo dotnet

call instead of needing to give the full path every time.

I installed dotnet on a linux VM with sudo using dotnet-install.sh. Dotnet is installed in /root/.dotnet/ . I can run the dotnet executable with sudo /root/.dotnet/dotnet --version which prints the version as expected. However, even though I did export PATH='$PATH:/root/.dotnet" to add the dotnet folder to $PATH, and I can see that it's been added by doing echo $PATH, trying to execute sudo dotnet --version will result in a Command not found error. How can I add the path properly so the dotnet executable can be ran with just sudo dotnet ...?


Viewing all articles
Browse latest Browse all 5944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>