.NET 5

Install

source: microsoft.com

Add the package repository:

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

SDK:

sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-7.0

Runtime:

sudo apt-get update && \
  sudo apt-get install -y aspnetcore-runtime-7.0

ASP.NET Core

see Getting Started (how to create and view a template website)