In this article, we will have explained the necessary steps to install and configure .NET 5 on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
.Net Core is the latest open source innovative framework of Microsoft on top of their propriety .Net Framework 5. .Net Framework is not only industry standard when it comes to developing highly scalable dynamic applications but also several businesses thrived because of .Net Framework. With the latest .NET 5 release, it was developed as a cross-platform and open-source framework. It now supports Linux and macOS systems out of the box. It is also modular and lightweight.
Install .NET 5 on Ubuntu 20.04
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
sudo apt update sudo apt upgrade sudo apt install apt-transport-https
Step 2. Install the .NET 5 on the Ubuntu system.
- Install .NET from Microsoft.
Now enable Microsoft packages repository on your Ubuntu system:
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
It might take some time to update and fetch the required files from Microsoft repositories depending on your connectivity speed. Once done, install .NET 5 using the following command below:
sudo apt update sudo apt install dotnet-sdk-5.0
Verify your installation using the below command:
- Install .NET via Snap.
To install .NET via Snap package management, run the commands below:
sudo apt install snap sudo snap install dotnet-sdk --classic
That’s all you need to do to install Install .NET on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on Install .NET 5, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.