DEV Community

Cover image for How to install Windows Subsystem for Linux (WSL) on Windows 10
Ajisafe Oluwapelumi
Ajisafe Oluwapelumi

Posted on

How to install Windows Subsystem for Linux (WSL) on Windows 10

When I started my software engineering program at Holberton School sponsored by ALX, we were provided with a sandbox to run commands and programs but the sandbox had limitations. One of the biggest limitations for me was the constant need for internet connection to access and use the sandbox, a loss in connection would mean reconnecting and it was de-motivating at the time, there had to be another way. If you joined the ALX Software Engineering Program recently then this is for you.

Let's get into it, WSL is a virtualisation platform that allows Linux distributions (e.g. Ubuntu) to run within windows. You get to do everything you do on the sandbox without the limitations.

Step 1 - Turn Windows Feature On

The first step is to go to the bottom left corner of your Start bar and click on the Windows icon, type "turn windows feature on/off" in the search bar. The option will be shown as seen below, click on it.

Turn Windows feature on/off

Step 2 - Enable Windows Subsystem For Linux

Scroll through the options until Windows Subsystem for Linux is shown. Check the box and click OK to save changes. A new window will pop up with choices to restart your computer now or later. You will need to restart your computer immediately before going any further.

Windows Subsytem for Linux

Step 3 - Download Ubuntu

Upon restart of your computer, you could choose to download Ubuntu from Microsoft Store or from Ubuntu.
Microsoft Store page
Ubuntu website
Any of the options above will have Ubuntu distribution downloaded and available on your computer.

Step 4 - Access Terminal Through Ubuntu or Command Prompt

- Ubuntu

Go to your Start bar and click on the Windows icon, look through your apps for Ubuntu or Bash on Ubuntu (as is my case, see image below).
Windows search bar
Click to launch and the terminal will pop up. Ubuntu packages will be installed the first time the app is launched so it won't look exactly like the screenshot below but this is what it looks like upon completion.
Ubuntu on Windows

- Command Prompt

Another option is to access the terminal from the Windows Command Prompt. Go to the bottom left corner of your Start bar and click on the Windows icon, type "command prompt" in the search bar. As soon as you click the option, the command prompt will pop up. Type bash and press enter to access terminal.
Command prompt search
Windows command prompt

Congrats! You can now run shell commands on your computer without having an internet connection or relying on the sandbox provided on the intranet. Using the sandbox might be comfortable for the first few weeks however, it gets a bit uneasy as the projects come so take this advice from your big brother and install WSL on your computer.

There is another way to install Ubuntu (Vagrant) which you will encounter (if you haven't already) on the intranet however the scope of this article is limited to WSL. Please leave a comment in the comment box below if this article was helpful.

Top comments (0)