Download and install the below package:
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
How update the system and install transport https:
sudo apt install apt-transport-https && sudo apt update
Now install dotnet SDK 6:
sudo apt install dotnet-sdk-6.0
Also install dotnet core 6:
sudo apt install dotnet-runtime-6.0
Check dotnet version:
dotnet --version
Create hello world application:
dotnet new console -0 HelloWorld
Run the hello world application :
cd HelloWorld/ && dotnet run
For ubuntu 20.04 reference:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2004
For ubuntu 22.04 reference:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2204
Another good one:
https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-22-04/
Top comments (0)