sudo add-apt-repository universe
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-6.0
Step 1 – Enable Microsoft PPA
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
Step 2 – Installing Dotnet Core SDK
sudo apt update
sudo apt install apt-transport-https
sudo apt install dotnet-sdk-3.1
Step 3 – Install Dotnet Core Runtime Only
sudo apt update
sudo apt install apt-transport-https
sudo apt install dotnet-runtime-3.1
Step 4 – Create Sample Application
dotnet new console -o HelloWorld
cd HelloWorld
dotnet run
#For Ubuntu 20.04
#Installing with APT can be done with a few commands.
#Before you install .NET, run the following commands to add the Microsoft
#package signing key to your list of trusted keys and add the package
#repository.
#Open a terminal and run the following commands:
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
rm packages-microsoft-prod.deb
#Install the SDK
#The .NET SDK allows you to develop apps with .NET.
#If you install the .NET SDK, you don't need to install the corresponding
#runtime. To install the .NET SDK, run the following commands:
sudo apt-get update;
sudo apt-get install -y apt-transport-https &&
sudo apt-get update &&
sudo apt-get install -y dotnet-sdk-6.0