Unix Command To Change Password

I am a new Unix user at my university/school. In Unix, how do I change my password to safeguard and increase the security of my Unix account?

It is a good idea to change your password every month or at least every four months. Make sure you use combination of alphabets (upper and lower case characters), numbers, and special characters as a password to safeguard your account. You should choose a password of at least ten characters. Do not write down your username and password. Do not share your password or send anyone via email, even if the email or sysadmin requesting your password seems official. A request for a password via email is very likely a phishing scam.

passwd command syntax

You need to use the Unix passwd command to change your password. The syntax is:


The Unix will prompt you for your old password, ask for a new password, and force you to repeat your new password for verification. Please note that Unix passwords are case sensitive. The above command will change the password only on the computer or server you are currently using. If you are logged on nas01 server the password will only on the nas01 sever and not on nas02 or any other Unix based server/computer.

Sample demo

Animated gif 01: The Unix passwd command demo. Learn how to change your Unix password.

For more information please see passwd command man page.

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts