WSL: Basic Commands

Windows Subsystem for Linux (WSL) is a feature that allows users to run Linux distributions on a Windows computer. WSL comes with a set of commands that can be used to manage and interact with the Linux distributions installed on your system.

On this page, is a table of common WSL commands and their descriptions to help you get started with using the Windows Linux Subsystem.

CommandDescription
wslLaunches the default WSL distribution.
wsl -lLists all the installed WSL distributions.
wsl -l -vLists all the installed WSL distributions and their versions.
wsl -s <distro_name>Sets the specified distribution as the default WSL distro.
wsl --set-default <distro_name>Sets the specified distribution as the default WSL distro.
wsl --set-version <distro_name> <version>Changes the WSL version of the specified distribution.
wsl --unregister <distro_name>Uninstalls the specified WSL distribution.
wsl --export <distro_name> <file>Exports the specified WSL distribution to a tar file.
wsl --import <distro_name> <install_location> <file>Imports a tar file into a new WSL distribution.
wsl --terminate <distro_name>Terminates the specified WSL distribution.
wsl --updateUpdates the specified WSL distribution to the latest version.
wsl -u <distro_name>Upgrades the specified WSL distribution to the latest version.
wsl --installInstalls a new WSL distribution from the Microsoft Store.

For more tips on using WSL and maintaining installed distros, check out the WSL Blog Posts here.

One thought on “WSL: Basic Commands

Leave a Reply

Your email address will not be published. Required fields are marked *