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.
Tip: Here's how to tweak your PC to ensure top performance for a specific type of task, be it gaming, document work or something else.
After enabling WSL, you can install various Linux versions from the Store. You can use the following links:
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 --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 simply
wsl -l --all.
- To start a specific distro, type the command
wsl --user <Username> --distribution <DistributionName>or
wsl -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.
- 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