In this tutorial, we will show you how to install Dotnet Core on Ubuntu 20.04 LTS. For those of you who didn’t know, The .NET Core is a free and open-source software framework and open-source software framework. It is developed by Microsoft. It is developed by Microsoft. .NET Core is a very powerful framework. It is usually used to develop web applications.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step by step installation of Dotnet Core Microsoft on an Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian based distribution like Linux Mint.
Install Dotnet Core on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following
apt commands in the terminal.
sudo apt update sudo apt upgrade
Step 2. Installing Dotnet Core on Ubuntu 20.04.
.NET Core is not available in the official package repository of Ubuntu 20.04 LTS. But, you can easily add the official Microsoft package repository on Ubuntu 20.04 LTS and install:
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
- Install the .NET Core SDK
sudo apt update sudo apt install apt-transport-https sudo apt update sudo apt install dotnet-sdk-3.1
- Install the ASP.NET Core runtime
sudo apt update sudo apt install apt-transport-https sudo apt update sudo apt install aspnetcore-runtime-3.1
- Install the .NET Core runtime
sudo apt update sudo apt install apt-transport-https sudo apt update sudo apt install dotnet-runtime-3.1
Once installed successfully, you can use dotnet command-line utility to check the installed version of .NET Core on your system. To check dotnet version, type the following command:
$ dotnet --version 3.1.406
Step 4. Create a Sample Application Using .NET Program
Now we create a sample application with dotnet core on your Ubuntu system:
dotnet new console -o HelloWorld
Then, change to this directory and start working on your application:
Make your changes to the application and execute the below command to run this application:
Congratulations! You have successfully installed Dotnet Core. Thanks for using this tutorial for installing the Dotnet Core Microsoft on your Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you to check the official Dotnet Core website.