April 6, 2020

soltveit.org

..Geekish..

Install dotnet core on Debian 10

Install .net core on Debian 10

Install dotnet core on Debian 10 is essential to run dotnet core application on Debian. This time Microsoft has done it easy to install dotnet core 3 on lots of different Linux distributions.

Run the following commands. This only has to be done the very first time you install dotnet core.

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/10/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

Now you have 3 options on what to install. Do you want the complete SDK? That is needed if you are going to develop dotnet core applications. Or do you just want to run dotnet core applications? Then there is dotnet core runtime or asp net runtime.

By default, apt can not download packages from https. So we first need to install apt-transport-https

sudo apt-get update
sudo apt-get install apt-transport-https

Option 1: Complete .NET Core SDK

This will allow you to develop your own netcore applications.

sudo apt-get update
sudo apt-get install dotnet-sdk-3.1

Option 2: .NET Core 3 runtime

The dotnet core runtime files will allow you to run dotnet core and asp.net core application. So if you need to run both dotnet core and asp.net this is the option for you.

sudo apt-get update
sudo apt-get install dotnet-runtime-3.1

Option 3: ASP.NET Core runtime

This option will only run ASP.NET Core applications.

sudo apt-get update
sudo apt-get install aspnetcore-runtime-3.1

When Net Core 3.2 is released you only have to run the last part and change 3.1 to 3.2. Like this dotnet core runtime example:

sudo apt-get update
sudo apt-get install dotnet-runtime-3.2

That is how you install dotnet core on Debian 10. Now your system should be ready for .NET Core. Read more on Microsofts own pages.

Looking to install .net core on Raspbian?