WSL ubuntu password reset

Reset Password

Dong Xia
Dec 28, 2022
  1. Open cmd on windows
  2. Switch to root user
ubuntu config --default-user root

3. Open Ubuntu

whoami                 //root
ls /home //find your <your-username>
passwd <your-username> //set new password for user

4. Enter your new password

5. Set your user back to default

5. Back in cmd

ubuntu config --default-user <your-username>

Install and update

  1. Update package and install nvm
sudo apt update

2. Install NVM

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

3. Check version

nodejs --version
npm --version
nvm --version

4. To see list of all nvm commends

nvm

--

--