Manual Install of .Net Core 2.2 SDK on Ubuntu 19.04

Manual Install of .Net Core 2.2 SDK on Ubuntu 19.04

So you want to install .Net Core on your shiny new Disco Dingo installation.  What are your options? There are a few:

  • Manually install and configure
  • Use the "snap"
  • Use apt-get

My recommendation? Do the manual install. I've found the snap doesn't work well with VS Code (see this link: ). apt-get is nice, but with the manual you get some benefits, such as being able to install multiple .Net Core versions (which I'll cover in another post).

You can find various downloads for the .Net Core 2.2 SDK at Download .NET Core 2.2. Under "Build apps - SDK", download the binaries for your Linux platform (x64, ...), and then you need to install and configure your system. That will be the next thing I show you how to do.

We can directly download using the following command:


With that downloaded, it must be uncompressed into a directory.  I would recommend putting this in a directory named ~/dotnet-2.2-203.  You can do that with the following statement:

mkdir ~/dotnet-2.2-203 && tar -xvf dotnet-sdk-2.2.203-linux-x64.tar.gz -C ~/dotnet-2.2-203

And now we just need to create a symlink to the dotnet executable file in that directory:

sudo ln -s ~/dotnet-2.2-203/dotnet /usr/bin/dotnet

Why a symlink? Several reasons:

  • No need to set environment variables
  • It's easy to switch between different versions of dotnet by changing just the link

And that's all!  You're now able to use .Net.  To check, you can use dotnet --info, which should give you the following:

$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.2.203
 Commit:    e5bab63eca

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  19.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /home/mike/dotnet-2.2/sdk/2.2.203/

Host (useful for support):
  Version: 2.2.4
  Commit:  f95848e524

.NET Core SDKs installed:
  2.2.203 [/home/mike/dotnet-2.2/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.4 [/home/mike/dotnet-2.2/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.4 [/home/mike/dotnet-2.2/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.4 [/home/mike/dotnet-2.2/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: