June 2025
Beginner to intermediate
1180 pages
37h 48m
English
The wsl command is available in the Windows terminal. Without any additional parameters, it starts the WSL distribution directly in the currently active window. Then you can use WSL until you terminate the session using exit or (Ctrl)+(D). If multiple WSL distributions are installed, the default distribution will be used. This can be set via wsl --set-default.
The -d <wslname> and -u <username> options allow you to specify for which WSL installation and for which user the command should be run. From a security perspective, the possibility of gaining root privileges without any protection is confusing. (In particular, it is not necessary to specify a password or use sudo):
> wsl -d kali-linux -u root ...Read now
Unlock full access