The fastest way: use the passwd command

Open a terminal and type passwd, then press Enter. The system will ask you to enter your current password, then prompt you twice for your new password. Type carefully — the characters you enter will not appear on screen as you type them. Once you confirm the new password a second time, the change takes effect when ready.

This method works on any Linux distribution and requires no special permissions. You are changing only your own password, not anyone else's. If you make a mistake while typing, press Ctrl+C to cancel and start over.

Key Takeaways

  • The passwd command is the standard way to change your password on any Linux system, and you run it from a terminal window.
  • You must know your current password to change it — the system will ask for it first as a security check.
  • Passwords do not display as you type them, which is normal behavior and protects your password from being seen over your shoulder.
  • If you forget your password, you cannot use passwd to recover it — you will need to contact your system administrator or use your distribution's password recovery process.

Step-by-step: changing your password in a terminal

Start by opening a terminal. On most Linux desktops, you can right-click the desktop and select "Open Terminal" or search for "Terminal" in your applications menu. Once the terminal window is open, you are ready to begin.

Type the word passwd and press Enter. The system will respond with a prompt asking for your current password. This is a security measure — it confirms that you are the person authorized to change this account's password. Type your current password and press Enter. Remember that nothing will appear on screen as you type.

Next, the system asks you to enter your new password. Type it carefully. Again, you will see nothing on screen. Press Enter when you are done. The system will when ready ask you to type the new password a second time to confirm you did not make a typo. Type it exactly the same way and press Enter.

If both entries match, the system confirms the change with a message like "passwd: password updated successfully." Your new password is now active. The next time you log in or use sudo, you will need to use this new password.

What to do if you see an error message

If the system says "Authentication token manipulation error," you likely made a typo when entering your current password. Run passwd again and enter your current password more carefully. Remember that passwords are case-sensitive — "Password" is different from "password."

If you see "Permission denied," you may be on a system where your account does not have permission to change its own password. This is rare on personal computers but common on shared systems or servers. Contact your system administrator in this case.

If the system rejects your new password and says it is "too straightforward" or "too short," your system has a password policy in place. Try a password that is at least 8 characters long and includes a mix of uppercase letters, lowercase letters, numbers, and symbols like ! or @. Different systems enforce different rules, so you may need to experiment.

Changing someone else's password (administrators only)

If you are a system administrator and need to change another user's password, the command is sudo passwd username, where "username" is the account you want to change. For example, sudo passwd john changes the password for the user named john. You will need to enter your own password first to confirm you have administrator rights.

When you run this command, the system will not ask for the old password — it will only ask you to enter the new password twice. This is useful when a user has forgotten their password and needs a reset. After you set the temporary password, give it to the user securely, and they can change it to something only they know by running passwd themselves.

Why passwords do not show as you type

When you type a password in a Linux terminal, the characters do not appear on screen. This is intentional security behavior, not a malfunction. It prevents someone standing behind you from reading your password off the screen. It also prevents the password from being stored in your terminal's history or visible in screenshots.

This can feel strange the first time you do it, especially if you are used to seeing asterisks or dots appear as you type. On Linux, you straightforward see nothing — just a blank line. This is normal. Type your password carefully and press Enter when you are done.

Changing your password on a remote server

If you are logged into a remote Linux server through SSH, the passwd command works exactly the same way. Open your SSH connection, type passwd, and follow the same steps. The password change happens on the remote server, not on your local computer.

After you change your password on a remote server, you do not need to log out and log back in. Your new password takes effect when ready for future logins. If you are still connected via SSH, you remain logged in with your current session — the new password is only required the next time you connect.

What happens if you forget your new password

If you change your password and then forget it, you cannot use passwd to recover it. Linux does not store a copy of your password that can be retrieved. Your options depend on your situation.

On your own computer, you can restart in recovery mode or use a live USB to reset your password. The exact steps vary by distribution — Ubuntu, Fedora, and others have different recovery processes. Search for "[your distribution name] password recovery" for specific instructions.

On a shared system or server, contact your system administrator. They can reset your password to a temporary one, which you then change to something new using passwd. This is why administrators should never share passwords — they cannot see what your password is, only reset it.

Frequently Asked Questions

Can I change my password without knowing the old one?

No, the passwd command requires your current password as a security check. Only system administrators using sudo passwd username can bypass this step. If you have forgotten your password, you will need to use your distribution's recovery process or contact an administrator.

How often should I change my password?

This depends on your situation and your organization's policy. For personal computers, changing your password once or twice a year is reasonable. For work systems or servers, follow your organization's requirements. If you suspect someone has seen or guessed your password, change it when ready.

What makes a strong Linux password?

A strong password is at least 12 characters long and includes uppercase letters, lowercase letters, numbers, and symbols. Avoid dictionary words, your username, or personal information like birthdays. A random combination like "Kx7!mP2$vQn9" is stronger than "MyDog2024" even though the second is longer.

Do I need to restart my computer after changing my password?

No. Your password change takes effect when ready. You do not need to restart, log out, or do anything else. The new password is active as soon as the system confirms the change.

Can I change my password if I am using a graphical desktop?

Yes, most Linux desktops have a graphical settings tool where you can change your password without opening a terminal. Look for "Users," "Accounts," or "System Settings" in your applications menu. However, the terminal method with passwd works on every Linux system, regardless of desktop environment.