How to install dotnet runtime and sdks on debian virtual machine?
This should be simple like:
1. Add appropriate repository
2. Then
sudo apt install
But I'm not able to add repository.
I tried sudo apt-add-repository https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb
It shows following errors:
1. 403 Forbidden
2. 404 Not Found
I'm new to linux7 Replies
Install .NET on Debian - .NET
Learn about which versions of .NET SDK and .NET Runtime are supported, and how to install .NET on Debian.
Thanks
I end up manually downloading it from https://dotnet.microsoft.com/en-us/download/dotnet/8.0
I works as intended but I am not able to set it as system wide environment variable.
I tried adding its path to
/etc/environment
like this
DOTNET_ROOT="/home/user/directory_where_i_have_downloaded_dotnet_runtime"
But it still shows dotnet: command not found
if I type dotnet in any directory other than the one where it is present.Microsoft
Download .NET 8.0 (Linux, macOS, and Windows)
.NET 8.0 downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of applications.
DOTNET_ROOT
is just an env var that, IIRC, dotnet itself uses
You need to add that dir to PATHPATH="/home/user/directory_where_i_have_downloaded_dotnet_runtime"
Like this?Ideally without replacing your existing PATH
debian add directory to path at DuckDuckGo
DuckDuckGo. Privacy, Simplified.
Thanks it worked out
I had to add path in
/etc/profile