WSL or is an integral part of Windows 10 and a boon for the builders who depend on any of the flavors of Linux to get their work achieved. However, it has all the time been a drawback to handle customers as soon as the administrator account has been set up on the startup. In this text, we will probably be trying out how to set default user, switch user, and remove a user on a Windows Subsystem for Linux distro on Windows 10.
Set default user, switch user, remove a user for WSL
We will probably be overlaying the next procedures on this information:
- How to set default user for WSL
- How to switch user for WSL
- How to remove a user for WSL.
1] Set default user for WSL
When you open a WSL Distro in your Windows 10 pc, it begins signing you into a explicit default user account. You can change this default user if you need. You want to open or with Administrator degree rights.
Now execute the next instructions for the a number of Linux distros:
ubuntu config --default-user
Ubuntu 18.04 LTS:
ubuntu1804 config --default-user
Ubuntu 16.04 LTS:
ubuntu1604 config --default-user
openSUSE Leap 42:
openSUSE-32 config --default-user
SLES-12 config --default-user
debian config --default-user
kali config --default-user
You may also change
2] Switch user in WSL
When you open a WSL distro, the command line robotically logs you into the default user we talked b. But if you need to switch user to one other user account, it’s pretty easy too.
Open the distro’s root location. Type in one of many following instructions to switch to a explicit user:
su -l su --login
You can have to change
three] Remove a user in WSL
In this case, there will probably be two situations. One will probably be the place you’re logged in as a SUDO user and the opposite one the place you’re logged in as ROOT. We will probably be overlaying each of those situations.
- When logged in as a SUDO user.
- When logged in as a ROOT user.
When logged in as a SUDO user:
You want to execute the next command if you find yourself logged in as a SUDO user and need to delete a User account inside the identical Linux distro:
When logged in as a ROOT user:
And in case you are logged in as ROOT, the strategy is barely completely different. First, you want to refer to the above information to set a default user. This default user would be the one that you really want to remove. Then, you want to execute the next command to delete a user in the identical Linux distro:
It is price ensuring that the
Hope this helped.