WSL (Windows Subsystem for Linux)

A cheat sheet for WSL (Windows Subsystem for Linux)
23 Jun 2025 23 Jun 2025 1 min read WSL Windows

This is a cheat sheet for WSL.

Note

There is no UI to interact with WSL.

List all installed distros 


wsl -l -v
Tip

This also lists whether the distro is currently running.

Log into distro 

Log into the default distro:


wsl

Log into any other distro:


wsl -d <DistroName>

Both commands start the distro, if it’s not yet running.

Shutting down a distro 

WSL automatically stops any distro if it hasn’t been used for a certain time. This timeout is 1 minute by default but can be changed via vmIdleTimeout in the .wslconfig.

If you still need to kill a distro, use:


wsl --terminate <DistroName>

To shut down WSL and all of its distros, use:


wsl --shutdown

Version and update 

Show current WSL version:


wsl --version

Update to the newest WSL version:


wsl --update
Note

This will only update WSL itself but not the distros.

To update a distro, you need to log into the distro and use the distro’s own update mechanism.