Setting the scene
I’m running debian buster, and I want to install PowerShell Core and the dotnet SDK.
Installing the .NET Core SDK
The latest version of the .NET Core SDK is 3.1, go to the following link dotnet.microsoft.com/download
It should automatically detect that your on linux, and show you something like the following:
Installing on debian 10
I’m running debian 10 on my laptop, but Microsoft have provided instructions for a lot of different linux distributions, choose your favourite flavour.
1. Register the Microsoft gpg key and the feed
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
2. Install the .NET Core SDK
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1
3. Install ASP.NET Core runtime
sudo apt-get update
sudo apt-get install aspnetcore-runtime-3.1
4. Install .NET Core runtime
sudo apt-get update
sudo apt-get install dotnet-runtime-3.1
Install PowerShell Core with the dotnet runtime
dotnet tool install --global PowerShell
Install Azure CLI
Install Azure PowerShell module
Install-Module -Name Az -AllowClobber -Scope AllUsers