How to install .NET SDK in Ubuntu 20.04

To install .NET on ubuntu 20.04, 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
sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update

To find all versions of .NET SDK available, run

apt-cache search dotnet-sdk

dotnet sdk ubuntu

To install .NET SDK version 6, run

apt install dotnet-sdk-6.0

For .NET SDK 5, run

apt install dotnet-sdk-5.0

For .NET SDK 3.1, run

apt install dotnet-sdk-3.1

For .NET SDK 2.1, run

apt install dotnet-sdk-2.1

Back to dotnet

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *