How to Install Dotnet Core on Ubuntu

How to Install Dotnet Core on Ubuntu HostnExtra

In this article, we’ll explain how to install Dotnet Core on Ubuntu.

.NET Core is a free, cross-platform, open-source developer platform for building many different types of applications. Software developers often need to use the Dotnet core framework on the Linux system to test, run, and build the packages.

The notion of using Dotnet on Linux comes true through the new Dotnet core, which is an API based modular system of Microsoft’s Dotnet framework. But the Dotnet core doesn’t act as a single API; it functions as a shared or public library of API and codes.

Prerequisites

Install Dotnet Core on Ubuntu

Step 1: Download and Install MS Prob on Ubuntu

# wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb

Now, run the following Debian package installer command to install the MS prob package on your Ubuntu machine.

# sudo dpkg -i packages-microsoft-prod.deb

Step 2: Install the Dotnet SDK

First, update and install the transport-HTTP tools to install the Dotnet SDK package.

# apt update

# apt install apt-transport-https -y

Now, install the Dotnet SDK packages

# apt install dotnet-sdk-3.1

Once the installation gets completed, follow output will show:

Welcome to .NET Core 3.1!
— — — — — — — — — — -
SDK Version: 3.1.409

Step 3: Create a New Project

Run following command to create a project:

# dotnet new console -o HostnExtra

The project will be stored in the ~/HostnExtra/ directory.

Run the following cd command to open the project’s directory. Then run the Dotnet run command to run your project.

# cd Reconshell
# dotnet run

Output:

Hello World!

That’s it. We have completed with the installation.

In this article, we have seen how to install Dotnet Core on Ubuntu.

HostnExtra was founded in 2016. All of our servers are located in the continental United States and United Kingdom. View more details https://www.hostnextra.com