Tag Archives: Linux

Installing .Net on Ubuntu… on Windows

With the new Windows Subsystem for Linux, and the Windows Terminal, comes the ability to run .Net programs on Linux from your Windows machine.

Here I wrote briefly about how you can install and run Linux on your Windows machine. In this post, I’ll cover how to install .Net.

If you don’t have the Windows Terminal, then you can install it here.

The installation process is pretty straightforward, and the first step is to launch the Windows Terminal. Once that’s running, open a Linux tab, and run the following two scripts (if you’re interested in where these came from, follow the link in the References section below):

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

Then run:

sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-3.1

That should do it. To verify that it has:

dotnet --version

And you should see:



Install and Run Linux on Windows 10

Windows 10 now has a feature that allows you to install Linux. That’s right – you can install Linux on a Windows machine.

If you haven’t already, install the Windows Terminal from the store.

You’ll then need to turn on the subsystem. Launch Windows Features:

This requires a restart, in fact, this whole process requires at least two restarts. Once you’ve brought the machine back up, have a look on the Windows Store for your favourite Linux; here’s the Ubuntu one:

Once this has installed, launch the store app. You’ll be prompted to select a username and password – this is your root password, so make sure you know what it is.

Now launch Windows Terminal:

And you’re away – you can rm -r to your hearts content!