Friday, November 15, 2024
Google search engine
HomeGuest BlogsHow to Change Password in Ubuntu 22.04 using Terminal

How to Change Password in Ubuntu 22.04 using Terminal

Changing the root user password, changing a user password using their username, and changing a password on an Ubuntu system are essential tasks for maintaining security and access control. Through this tutorial, we will learn how to change or update password in linux ubuntu using command line or terminal.

Ubuntu 22.04 Change User Password Command Line

Steps to change ubuntu, root user password in linux ubuntu 22.04 using command line or terminal:

  • Step 1 – Open Terminal
  • Step 2 – Change Password using Username in ubuntu
  • Step 3 – Change Root User Password
  • Step 4 – Ubuntu User Change Password

Step 1 – Open Terminal

Press Ctrl + Alt + T to open a terminal window. You can also search for “Terminal” in the applications menu.

Step 2 – Change Password using Username in ubuntu

Once you have identified the username, you can change the user’s password using the passwd command. Replace USERNAME with the actual username.

Execute the following command on the command line to change a password for a user named “neveropen” in Ubuntu:

sudo passwd neveropen

Step 3 – Change Root User Password

To change the root user password, you need to become the root user. You can achieve this by using the sudo command. Type the following command and press Enter. You will be prompted to enter your user account password.

sudo -i

Once you are logged in as the root user, you can change the root password using the passwd command. Simply type passwd and press Enter. You will be prompted to enter the new password and then confirm it by typing it again. The password will not be displayed as you type it for security reasons.

sudo passwd root

Step 4 – Ubuntu User Change Password

Execute the following command on the command line to change your own password for Ubuntu:

passwd

Conclusion

Through this tutorial, we have learned how to change or update passwords in Linux ubuntu using command line or terminal.

Recommended Linux Ubuntu Tutorials

RELATED ARTICLES

Most Popular

Recent Comments