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.
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- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
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
Create C# Console App
To finish this article, I will create a test “Hello world” Console application using the commands below:
dotnet new console
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.