In this article, we will see how to install Ubuntu 20.04 LTS on Windows 10 WSL. You might be aware of installing Linux distributions on VirtualBox or VMware. But the problem there is that it takes quite some time to complete the installation. So if someone needs to quickly bring up a Linux distribution without much hazzle then using VirtualBox or VMware probably would not be a good idea here.
Instead one can rely on WSL application where you can almost quickly install a distribution on Windows Subsystem for Linux(WSL) application on Windows 10 Version 1903, Build 18362 or later. It's not just quick but also provides lot of features and utilities inline to developers requirement. Here we will see the steps to install and use one such Linux distribution i.e Ubuntu 20.04 LTS on Windows 10 WSL. More about WSL on official website.
How to Install Ubuntu 20.04 LTS on Windows 10 WSL
Also Read: How to Install Wireshark on Windows 10 [Step by Step]
Step 1: Prerequisites
a) You should have a running Windows 10 Version 1903, Build 18362 or later.
b) You should have administrator or equivalent access in the System.
c) You should have an active Internet Connection in the System.
Step 2: Enable WSL
First, you need to enable WSL in your Windows 10 System. For that you need to click on
Windows Icon on the bottom left corner and then click on
Settings Icon as highlighted below.
Here you need to click on
Apps as shown below.
Then click on
Apps & features from where you need to go to
Programs and Features as highlighted below.
Here you will see an option called
Turn Windows features on or off as highlighted below. Click on it to open.
You need to scroll down to a feature called
Windows Subsystem for Linux. Select the check box in front of it to enable this feature. Click on
OK to proceed with installing this feature.
It will start installing and after few mins you will see below reboot screen. You need to click on
Restart now to complete the feature installation.
Step 3: Install Ubuntu 20.04 LTS
Next step is to open
Microsoft Store by searching it in the search bar as shown below.
You can then search
ubuntu in the search bar of
Microsoft Store and look for
Ubuntu 20.04 LTS distribution as shown below. Once it appears, tap on it to open.
Once opened, click on
Get to start downloading Ubuntu 20.04 LTS linux distribution. Microsoft might ask your age to confirm. So please provide your correct date of birth to continue.
After providing the requested details, Ubuntu 20.04 LTS will start downloading as shown below.
Once completed, you will see below screen where you need to click on
Open to proceed with the installation.
As soon as you click on
Open, installation will start like shown below and takes few minutes to complete depending your network and system configuration.
Few mins later, it will then ask you enter new UNIX username and new password to create a default UNIX user account.
After providing the account details, installation will be completed as shown above and you will be logged in to the distribution. You can now check the OS release and other related information by using
cat /etc/os-release command as shown below.
If you are looking to sync the packages with the latest available version on default Ubuntu repo then you need to run
sudo apt update command as shown below.
If you are looking to install a new package say
curl in our case, then you need to use
sudo apt install curl command as shown below. This will download and install the package along with all its dependencies from default Ubuntu Repo.
curl utility, you can check the installed version by running
curl --version command as shown below.
You can also check other system information like disk filesystem usage by using
df -h command as shown below.
If you want to logout from the System then you need to run
exit command as you can see below.
But that does not mean distribution will get shutdown. You can verify this by running
wsl -l -v command on your Windows 10 System command line. You will notice that the distribution
Ubuntu-20.04 is still running.
If you would like to connect back again, then you need to go to
Microsoft Store and open
Library as you can see below.
Here you will see all the apps installed in the Store. To connect back to Ubuntu 20.04 LTS distribution, you need to click on
Open as shown below.
In case if you would like to shut down the distribution then you need to use
wsl --shutdown Ubuntu-20.04 command as shown below.
C:\>wsl --shutdown Ubuntu-20.04
You can then verify the shutdown status by running
wsl -l -v or
wsl --list --verbose command as shown below.
C:\>wsl -l -v NAME STATE VERSION * Ubuntu-20.04 Stopped 1
You can check more about wsl commands on 11+ Best WSL Command Examples on Windows 10 System.