The Best of Both Worlds: Run Linux GUI Apps Seamlessly on Windows with WSL πŸŽ‰

Oct 24, 2023Thanks 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.

run-linux-in-windows-with-wsl

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 .

wsl-for-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!


Β© Rayan Fernandes. All Rights Reserved.