The best way to Set up .NET 5 on Ubuntu Linux

Would you like to develop .NET applications on your Ubuntu computer? How to install the Dotnet 5 framework on your system.

Want to download .NET 5 and install it on your Ubuntu computer, but can't figure out how? This guide will walk you through the entire process of installing .NET 5 (Dotnet 5) on Ubuntu Linux 20.04 (LTS). Dotnet 5 is the latest version of the .NET Core family and supports even more application types and platforms than its predecessor.

Although this article focuses on installing .NET 5 on Ubuntu Linux, Dotnet 5 is also supported by other Linux distributions such as CentOS, Red Hat Enterprise Linux, Alpine, etc.

What is .NET 5?

The .NET Framework has existed since 2002. At the time of its first publication, the framework was only supported on the Windows operating system. Microsoft is currently responsible for developing and distributing the framework.

In contrast to the original .NET framework, .NET 5 is a cross-platform open source framework. You can develop and run .NET 5 applications on other platforms such as Linux and macOS. Best of all, Dotnet 5 is modular and lightweight.

Connected: Open Source vs. Free Software: What's the Difference?

Install the .NET SDK on Ubuntu

If you want to install the .NET Framework for developing and running .NET apps, you must first install the .NET Software Development Kit (SDK), which by default also includes the .NET Runtime.

First, add the Microsoft package repository to your system's package list. Also, add Microsoft's package signing key to your trusted key collection.

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

After adding the new package repository, use to get the latest package information from your package sources suitable.

sudo apt update

To be able to securely install the .NET SDK over HTTPS, you have to install that apt-transport-https Package with the following command.

sudo apt install apt-transport-https

Then install the .NET 5 SDK using the following command.

sudo apt-get install -y dotnet-sdk-5.0

Alternatively, you can also install the Dotnet SDK snap into place.

sudo snap install dotnet-sdk

More information: Using apt and saying goodbye to apt-get

Check the installation

To verify that .NET 5 was installed successfully, you can run the following command to list the available SDKs on your system. If you have multiple SDKs installed, they will all be listed here.

dotnet –list-sdks

As mentioned earlier, when you install the .NET 5 SDK, the .NET runtime is included by default. Check the runtime installation with the following command.

dotnet –list-runtimes

Developing applications with .NET

Although .NET is easy to install and use, users sometimes encounter problems that are difficult to troubleshoot. In such situations, you can use the command below to learn more about that Point net command and its options.

dotnet –help

The various components in the .NET Framework confuse many developers. Before you start developing applications using the framework, it can be helpful to know what .NET really is.

Microsoft .NET Framework: Why You Need It And How To Install It On Windows

You either need to install it or update it. But do you know what the .NET Framework is? We'll show you why you need it and how to get the latest version.

Continue reading

About the author

Mwiza Kumwenda
(12 articles published)

Mwiza is a professional developer of software and writes extensively on Linux and front-end programming. Some of his interests include history, economics, politics, and enterprise architecture.

More
By Mwiza Kumwenda

Subscribe to our newsletter

Sign up for our newsletter to receive tech tips, reviews, free e-books, and exclusive offers!

One more step …!

Please confirm your email address in the email we just sent you.

Leave a Reply

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