Thanks to Microsoft, developers can now truly live the dream: a smooth workflow with the power of Linux and the convenience of Windows β all in one place.
With WSL (Windows Subsystem for Linux), you can:
β Run full Linux distros β Launch Linux GUI apps β Browse Linux files in Windows Explorer β Use VS Code directly inside your Linux environment
And the best part? Itβs ridiculously simple to get started.
π οΈ Step 1: Install WSL
If youβre on Windows 10 (build 2004+) or Windows 11, just open PowerShell or Command Prompt as Administrator and run:
wsl --install
This command installs:
- WSL 2
- Ubuntu (by default)
- The required Linux kernel
After installation, restart your system when prompted.
π€ Step 2: Set Up Your Linux User
Once Ubuntu starts up, youβll be asked to create a username and password.
Want to change the default user later?
ubuntu config --default-user your_username
π Imported Distros & Default Users
If youβve cloned/imported a custom WSL distro using:
wsl --export
wsl --import
And you're always logged in as root or the wrong user, refer to this SuperUser thread for a fix: π Set default user for manually installed WSL distro
π§βπ» Step 3: Open VS Code in WSL
Once inside Ubuntu, type:
code .
If you've installed VS Code from the Microsoft Store, this will open your current Linux directory in a native VS Code window β no extra setup needed.
π Step 4: Browse Linux Files
Open File Explorer and enter:
\\wsl$\Ubuntu\
Navigate your Linux filesystem just like a normal folder. You can also create a /home/yourname/projects/
directory and see it reflected here.
πͺ Bonus: Run Linux GUI Apps!
Letβs try something fun β a graphical Linux app running on Windows.
sudo apt update
sudo apt install mate-system-monitor
mate-system-monitor
This installs a task manager utility, and yes β it launches as a GUI app on your Windows desktop. π
π Wrap-up
With WSL2 + GUI support + VS Code integration, Microsoft has built a developer experience thatβs hard to beat.
No dual-booting. No VMs. Just one command line away from a full Linux workstation β right inside Windows.
Have fun hacking!