Ubuntu article thumbnail image.

How do you change the username for a user on the Ubuntu operating system?

You can change your user's password by using the passwd command (replace bob with your user's name):

sudo passwd bob

You may be asked to enter the current password for the user.

Then you'll be prompted twice for the replacement password. The second input is compared against the first and both are required to match before the new password is successfully set.

Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

When that command finishes, your new password will be set!

You can read more about the passwd command in the Ubuntu manual.

Thanks for reading!

About the author

Hi, I'm Nick Major. I'm a software developer from Wisconsin, United States.

I create free and premium courses, have published hundreds of informational coding articles, and am currently a Frontend Software Engineer at RoundingWell.

You can read more about me here.

Picture of Nick Major.