Skip to content

Changing your password in Linux

Updates & News  ·  Christopher Sakel  ·   ·  Updated on  ·  1 min Reading time

In this blog article I want to show you how to change your password in Linux.

First we log in to the server via SSH, e.g. with Putty.
Now we run the following command:

root@testserver ~ # passwd [user]

In our case:

root@testserver ~ # passwd root

We are now prompted to enter a new password. The password you type is not visible.
Once we've confirmed the password, our password is changed.

root@testserver ~ # passwd
New password:
Retype new password:
passwd: password updated successfully

Frequently asked questions

How do I change a Linux password?
Log in via SSH and run passwd [user]. For root, use passwd root.
Is the typed password visible in the terminal?
No, the password you enter is not shown on screen.
How do I confirm the password was changed?
After entering and retyping the new password, the terminal shows "passwd: password updated successfully".