Stepwise Guide to Enable Windows Subsystem for Linux (WSL)

Microsoft built new infrastructure within Windows – the Windows Subsystem for Linux (WSL) – upon which we run a genuine Ubuntu user-mode image provided by Microsoft's great partners over at Canonical, creators of Ubuntu Linux. The result is that you can now run native Bash on Ubuntu on Windows.

1. Enable the Windows Subsystem for Linux (WSL)

To enable the Windows Subsystem for Linux, open the Control Panel, click Programs and Features, and click Turn Windows Features On or Off in the left sidebar under Programs and Features. Enable the Windows Subsystem for Linux option in the list here and click OK. After you do, you'll be prompted to reboot your computer. Click Restart Now to reboot your computer.

2. Download Ubuntu/Debian

Windows Subsystem for Linux (WSL) supports a variety of Linux distributions, including Ubuntu and Debian, You can find them by opening the Microsoft store app and searching for Ubuntu/Debian.

3. Open Ubuntu and Create an Account

After the installation, you can find it in the start menu. Once Ubuntu has finished its initial setup, you'll be asked to create a username and password for Ubuntu (this does not need to match your Windows user credentials).

Now, you can install the latest updates for Ubuntu with the following commands (enter your password which you just created when prompted):

sudo apt update && sudo apt upgrade

To check the installed version you can run this command:

lsb_release -d

4. Customising your Terminal with Windows Terminal

You can also install Windows Terminal from Microsoft Store to improve your experience.

Windows Terminal allows you to open multiple Terminal instances as tabs, so you can have PowerShell running alongside Ubuntu. It also includes a number of customisation options.

That's it!


You've successfully subscribed to Developer Insider
Great! Next, complete checkout for full access to Developer Insider
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.