Install dotnet core on Ubuntu

I do a lot of development on Ubuntu, specifically Ubuntu running in WSL 2 inside of Windows. It's awesome to have the goodness of Linux inside of the usefulness of Windows.

When I fire up a connection to a new Linux box and type "dotnet" and get "command 'dotnet' not found", here's what I do:

  1. wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
  2. sudo dpkg -i packages-microsoft-prod.deb
  3. rm packages-microsoft-prod.deb
  4. sudo apt-get update;
    sudo apt-get install -y apt-transport-https &&
    sudo apt-get update &&
    sudo apt-get install -y dotnet-sdk-6.0

Now I'm cooking with dotnet GAS! Look!

dotnet is ready for business