Windows Subsystem for Linux
How to list distro in wsl
wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-18.04 (Default)
kali-linux
now there are 2 distro's were listed
Ubuntu-18.04
kali-linux
How to login to a specific user to a specific distro in wsl
wsl -u username -d kali-linux
--help
Copyright (c) Microsoft Corporation. All rights reserved.
Usage: wsl.exe [Argument] [Options...] [CommandLine]
Arguments to run Linux binaries:
If no command line is provided, wsl.exe launches the default shell.
--exec, -e <CommandLine>
Execute the specified command without using the default Linux shell.
--
Pass the remaining command line as is.
Options:
--distribution, -d <DistributionName>
Run the specified distribution.
--user, -u <UserName>
Run as the specified user.
Arguments to manage Windows Subsystem for Linux:
--export <DistributionName> <FileName>
Exports the distribution to a tar file.
The filename can be - for standard output.
--import <DistributionName> <InstallLocation> <FileName>
Imports the specified tar file as a new distribution.
The filename can be - for standard input.
--list, -l [Options]
Lists distributions.
Options:
--all
List all distributions, including distributions that are currently
being installed or uninstalled.
--running
List only distributions that are currently running.
-setdefault, -s <DistributionName>
Sets the distribution as the default.
--terminate, -t <DistributionName>
Terminates the distribution.
--unregister <DistributionName>
Unregisters the distribution.
--upgrade <DistributionName>
Upgrades the distribution to the WslFs file system format.
--help
Display usage information.
Last updated
Was this helpful?