How to install Windows Subsystem for Linux (WSL) on Windows 10
Tags: webdev, tutorial, programming
Published: 2022-11-20 23:08:49

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6c6gjro73eoo4nceqbp9.JPG)

#### 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfbhzt2pghmdxqsuep45.JPG)

#### Step 3 - Download Ubuntu
Upon restart of your computer, you could choose to download Ubuntu from [Microsoft Store](https://www.microsoft.com/p/ubuntu/9pdxgncfsczv) or from [Ubuntu](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#1-overview). 
![Microsoft Store page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2d7e4ak99pfmnh7j6z8j.JPG)
![Ubuntu website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vmuz5hasrctblkqhw2h.JPG)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b5g1318cwbo5kriuqqcj.jpg)
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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5rdg8hy1wm7g2pfxci17.JPG)

#### - 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/arerd83cke2kycvrqdss.JPG)
![Windows command prompt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3eq7wao6qs4pal6vpfu.jpg)

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.