Install .NET Core 2.2 On Ubuntu 18.04 Linux

In this blog post, I will show you how I install .NET Core 2.2 on my Azure Ubuntu 18.04 virtual machine and run the famous hello world application.

Get Started,

Before, you start, make sure you have the correct Ubuntu 18.04 build, In my case, I have also installed PowerShell Core for Linux on my Linux VM.

To start the installation, I have logged on to my VM and run the four commands below:

wget -qO- | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list

Once the commands completed, I will run the four command below which will install .NET Core 2.2

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.2

Check .NET Core Version

Now that the installation is completed, and I will check the installed .NET Core version using the line below

dotnet --version

Create C# Console App

To finish this article, I will create a test “Hello world” Console application using the commands below:

dotnet new console
dotnet run


There is no doubt that blockbuster tools from Microsoft can now run on any platform and I think it gives us flexibility in our deployments.

In my case, this is an advantage for many deployment cases.

One Reply to “Install .NET Core 2.2 On Ubuntu 18.04 Linux”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.