Advertisement

Change User Password in WSL Linux Distro in Windows 10

If you need to change your user account in a WSL Linux distro, it can be a bit tricky when you are not familiar with Linux console tools. We will see how to change the password without resetting the distro.

Advertisеment

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.

Linux Distros Microsoft Store Windows 10

After enabling WSL, you can install various Linux versions from the Store. You can use the following links:

  1. Ubuntu
  2. openSUSE Leap
  3. SUSE Linux Enterprise Server
  4. Kali Linux for WSL
  5. Debian GNU/Linux

and more.

When you start a WSL distro for the first time, it opens a console window with a progress bar. After a moment of waiting, you will be prompted to type a new user account name, and its password. This account will be your default WSL user account that will be used to sign-in automatically every time you run the current distro. Also, it will be included in the 'sudo' group in order to allow it to run commands elevated (as root).

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows user account.

If you have access to your Linux user account and know your current password, change it using Linux password reset tools of that distribution -- most likely passwd.

To Change User Password in WSL Linux Distro in Windows 10,

  1. Run the WSL distro for which you want to change the user password.
  2. Type passwd into the Linux prompt, and press Enter to change the password for the currently logged in user. Your current user name is visible in the beginning of the command line prompt. Also, it can be see with the command whoami.Windows 10 WSL Find Current User
  3. Type your current password.
  4. Type a new password.
  5. Re-type it to confirm the password change.Windows 10 WSL Change User Password
  6. To change the password for another user account, issue the command passwd <username>. Substitute the <username> portion with the actual user account name you want to change the password for.
  7. Repeat the steps 3-5 for that user account.

You are done.

Articles of interest:

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:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisеment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

2 thoughts on “Change User Password in WSL Linux Distro in Windows 10”

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.