Город МОСКОВСКИЙ
00:03:10

Reset Forgotten Ubuntu Linux Password on WSL

Аватар
Делай То, Что Полезно
Просмотры:
155
Дата загрузки:
15.09.2023 21:32
Длительность:
00:03:10
Категория:
Технологии и интернет

Описание

WSL (Windows Subsystem for Linux) is a handy tool for people who want to enjoy the power of Linux command line from the comfort of Windows.

When you install Linux using WSL on Windows, you are asked to create a username and password. This user is automatically logged on when you start Linux on WSL.

Now, the problem is that if you haven’t used it for some time, you may forget the account password of WSL. And this will become a problem if you have to use a command with sudo because here you’ll need to enter the password.

Don’t worry. You can easily reset the WSL Password. Just follow the video.

Step 1: Switch to root as default user

ubuntu config --default-user root

Step 2: Reset the password for the account

passwd username

You have to change the username in the above command with the actual user name.

Step 3: Set regular user as default again

ubuntu config --default-user username

Want more details? Text version of this topic: https://itsfoss.com/reset-linux-password-wsl/

Рекомендуемые видео