Install .NET SDK on Ubuntu 20.04

Microsoft .NET SDK and Run time now available for Linux. To install .NET SDK and runtime on Ubuntu 20.04, follow the instructions below

Run the following commands as user root. If you are logged in as a normal user, use the command “sudo su” to become user root.

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

Update the repo and install apt-transport-https

apt-get update
apt-get install -y apt-transport-https

Search for available dotnet-sdk versions

apt-cache search dotnet-sdk

apt search dotnet-sdk

On Ubuntu 20.04, Microsoft provides .NET SDK version 2.1, 3.1, and 5. Let’s install version 5.

apt-get install -y dotnet-sdk-5.0

To find the version of .NET SDK, run

dotnet --version

Find  dotnet version in Ubuntu

You can find .NET SDK and runtime available with commands

dotnet --list-sdks
dotnet --list-runtimes
Need help with Linux Server or WordPress? We can help!

Leave a Reply

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