Command Line Basics: Change Your Password

June 7, 2011 by
Filed under: command line, HowTo, linux, security 

Hopefully by now you understand the need to have a strong password for your computer login. Perhaps you selected your password when you first installed GNU/Linux and you've never changed it. Maybe you don't even know how to change it. Today I'll show you how to change your password from the command line.

Now you may be asking, isn't there a way I can do this through one of the system menus? Of course there is. The problem is, it's one way on Gnome, another way on KDE, yet another way on XFCE, etc., etc., etc. For me it's simpler to just open a terminal window and I can change my password, regardless of what desktop manager or window manager I'm using.

So without further ado, open up a terminal window and enter the command


The system will first prompt you for your current UNIX password. (I'm not sure why is mentions UNIX during this operation. I suspect it is from the legacy of the GNU tools being  a reverse engineering of Unix.) At any rate, this prompt just means to enter your current password. After that you'll be prompted to enter a new password. You'll then be prompted to enter your new password one more time for verification.

Affiliate Link

And that's all there is to it. Your login password has now been changed.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>