In a previous article, we reviewed the methods you can use to start a WSL Linux Distro in Windows 10, including the classic shortcuts in the Start menu, and ending the wsl.exe console tool. In this article, we will see how to run a distro as a specific user without setting that account as your default WSL user.
The ability to run Linux natively in Windows 10 is provided by the WSL feature. WSL stands for Windows Subsystem for Linux, which initially, was limited to Ubuntu only. Modern versions of WSL allow installing and running multiple Linux distros from Microsoft Store.
After enabling WSL, you can install various Linux versions from the Store. You can use the following links:
and more.
Windows 10 offers two methods to start a WSL distro. For distros installed from the Store, you can use either the console wls.exe
tool, or a Start menu shortcut. For imported WSL distros, Windows 10 does not create Start menu shortcuts as of this writing, so you are limited to wsl.exe
only. Also, if you need to run as distro as a specific user, you have to use wsl.exe
. Here's how it can be done.
To Run a WSL Linux Distro as a Specific User in Windows 10,
- Open a new command prompt or PowerShell instance.
- To run your default WSL distro, type
wsl--u <Username>
orwsl --user <Username>
and hit the Enter key. Substitute the<Username>
portion with the actual user name that exists in your default Linux distro. - To start a specific distro, find available WSL distros by executing the following command:
wls --list --all
, or simplywsl -l --all
. - To start a specific distro, type the command
wsl --user <Username> --distribution <DistributionName>
orwsl -u <Username> -d <DistributionName>
. Replace the<DistributionName>
portion with the actual name of the installed distro you want to run, e.g. kali-linux. - Substitute the
<Username>
portion with the actual user name that must exist in your default Linux distro.
That's it.
- Reset and Unregister WSL Linux Distro in Windows 10
- Reset Password for WSL Linux Distro in Windows 10
- All Ways to Run WSL Linux Distro in Windows 10
- Set Default WSL Linux Distro in Windows 10
- Find Running WSL Linux Distros in Windows 10
- Terminate Running WSL Linux Distro in Windows 10
- Remove Linux from Navigation Pane in Windows 10
- Export and Import WSL Linux Distro in Windows 10
- Access WSL Linux Files from Windows 10
- Enable WSL in Windows 10
- Set Default User for WSL in Windows 10
- Windows 10 Build 18836 Shows WSL/Linux File System in File Explorer
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: