Get a real Ubuntu Linux command-line onto your Windows 10 computer with WSL 2

Posted: (EET/GMT+2)

 

If you want a full Linux command-line on your Windows 10 machine without dealing with virtual machines, Microsoft has you covered nowaways. Windows Subsystem for Linux, aka WSL is now at version 2, and is becoming great option. WSL 2 was officially released in mid-2019, and by now it has become stable and surprisingly easy to set up, especially compared to previous WSL 1.

WSL 2 provides a real Linux kernel running in a lightweight virtualized environment. It boots fast (just few seconds), integrates cleanly with Windows, and gives you access to package managers, development tools, and command-line utilities exactly as they run on native Ubuntu. You can even see your Windows C:\ drive as a mount point.

To install WSL 2, just run from a regular command prompt (or PowerShell):

wsl --install

This will ask you which Linux distribution you want. Or, if you want to check which distributions are available:

wsl --list --online

Once installed, you can launch Ubuntu from the Start menu, or simply type:

wsl

File access works both ways. You can browse your Linux filesystem in Windows, and access your Windows files under /mnt/c in Linux (my choice is Ubuntu). This makes WSL 2 ideal for scripting, cross-platform development, and learning Linux tools without dedicating a virtual machine for the task.

If you haven't tried WSL 2 yet, I recommend it. It feels like having a second operating system available instantly whenever you need it.