How to Change Password on Ubuntu 22.04 using Terminal

[ad_1]

If you are using an Ubuntu 22.04 or 20.04 system, and you want to change the user’s password by username, the root user’s password, or Ubuntu own password, then for this you can use the sudo passwd, sudo root passed, and passwd commands.

Ubuntu 22.04 Change Password Command Line

Here are some approaches to change ubuntu, root user password, and sudo username password in linux ubuntu 22.04 using command line:

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

Approach 1 – Ubuntu change the user password using terminal

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 “tutsmake” in Ubuntu:

sudo passwd tutsmake

Approach 2 – Change Root User Password Ubuntu 22.04|20.04

To change the root user password ubuntu, 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

Approach 3 – Change Ubuntu Password Command Line

To change the password of the system of Ubuntu, you have to type the passwd command on the terminal and hit enter, and it will open the new password and confirm password prompt on the terminal, through which you can change its password:

passwd

Here is the video guide on How to Change Password on Ubuntu 22.04 Terminal:

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

[ad_2]

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

GSTIN is 03EGRPS4248R1ZD.

Contact
Jassweb, Rai Chak, Punjab, India. 143518
Item added to cart.
0 items - 0.00