How to Install .NET Core SDK and Runtime on Ubuntu 20.04 | 18.04

Install .NET Core SDK Ubuntu

This quick tutorial will show you how to install .NET Core SDK and Runtime on Ubuntu 20.04 or older systems using the command-line interface.

.NET Core is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems developed by Microsoft employees via the .NET Foundation. It is a cross-platform successor to .NET Framework.

As of .NET Core has been rebranded to .NET starting from version 5. The .NET framework supports the use of NuGet packages as opposed to the .NET Framework, which is serviced using Windows Update.

Step 1: Setup PPA

The Microsoft team provides and Debian packages to create PPA on Ubuntu systems. Run the following command in your terminal to download the Debian package and install it on your system.

$ wget -O packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb

For Ubuntu 18.08 download this package instead in the first step above:

$ wget -O packages-microsoft-prod.deb

Step 2: Install .NET Core SDK on Ubuntu

Run the following commands to update your apt-cache and to install the .NET SDK. The current version as of this writing is .NET 5.0

SUGGESTED  Ogre 2.1 Baldur Release Announced With a new Compositor

$ sudo apt update
$ sudo apt install -y apt-transport-https
$ sudo apt update
$ sudo apt install -y dotnet-sdk-5.0

Step 3: Install ASP.NET Core Runtime on Ubuntu

The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn’t provide the runtime. Run the following commands install the ASP.NET Core Runtime.

$ sudo apt update
$ sudo apt install -y apt-transport-https
$ sudo apt update
$ sudo apt install -y aspnetcore-runtime-5.0

As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn’t include ASP.NET Core support by replacing aspnetcore-runtime-5.0 in the previous command with dotnet-runtime-5.0:

$ sudo apt install -y dotnet-runtime-5.0


You have seen how easy it is to install .NET Core SDK and the Runtime options in Ubuntu 20.04 and 18.04.

SUGGESTED  Read the December 2015 ACCU Overload 130 Journal Online