Skip to main content

Command Palette

Search for a command to run...

WSL Ubuntu - Set User Password

Updated
1 min read
WSL Ubuntu - Set User Password
M

Mohamad's interest is in Programming (Mobile, Web, Database and Machine Learning). He is studying at the Center For Artificial Intelligence Technology (CAIT), Universiti Kebangsaan Malaysia (UKM).

Run command to set user password for root:

wsl -u root
passwd root
(type new password)

Run command to set password for other users:

wsl -u root
passwd user
(type new password)

Example: