Member-only story

How to Change a User Password in Linux

The 1 single command for changing user passwords in Linux

Mwiza Kumwenda
3 min readFeb 9, 2021
Photo by ThisIsEngineering from Pexels

The importance of passwords and the role it plays in our digital life cannot be emphasized enough. Passwords are probably our first line of defense when it comes to securing digital content.

Linux is by nature a multi-user operating system, meaning that you can share a Linux machine with other users. This is especially true for shared servers in the cloud. Without a solid password, unauthorized users may easily gain access to your content.

Fortunately, Linux is a robust and secure platform. And it offers a simple and intuitive way of managing user passwords from the command terminal.

A regular user can only change the password for their own account, while a superuser can change the password of any user account on the Linux system.

Changing your own password

The command for changing user passwords in Linux is passwd. To change your own password simply open the command terminal and type the following command.

$ passwd 

You will then be prompted to enter your old password followed by the new user password as in the figure below.

--

--

Mwiza Kumwenda
Mwiza Kumwenda

No responses yet