Check the ubuntu version by using this command
$ lsb_release -a
Let’s Add the Microsoft package signing key
$ wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
run the command below
$ sudo dpkg -i packages-microsoft-prod.deb
Install .NET core 3.1 on Ubuntu 20.04
$ sudo apt-get install -y apt-transport-https
$ sudo apt-get update
$ sudo apt-get install -y dotnet-sdk-3.1
Verify the installation by using the command below
$ dotnet --info
Create c# console application
$ dotnet new console -o hellowordapplication
run the application
$ cd hellowordapplication
$ dotnet run