How to make password visible in linux terminal

Whenever you need to execute a command with root privileges / with sudo – you have to enter password. One gets used to not see the password as he types but it can make few people uncomfortable while entering long and complex passwords. If one messes up one character, the whole password needs to be re-entered because we are just.. not sure. This stops now.

Today lets see a tweak that will make password asterisks visible as one types.

We are going to add “pwfeedback” in sudoers file and we will be good to go.

Launch terminal using Ctrl + Alt + T.

Run “sudo visudo” and enter password when prompted (This is the last time you won’t get to see the password asterisks while typing).

sudo visudo
sudo visudo

Note: By default, the file is opened with nano editor. The reason behind this is while saving the sudoers file, if the syntax is wrong, user will not be able to run any command using sudo or root privileges. With nano editor, syntax is checked upon saving. So it is always recommended to edit sudoers file via nano.

You will see sudoers file like one below. Using arrow keys, navigate to the end of line:

Defaults env_reset


We need to append this line with “,pwfeedback”. Result should look like this:

Defaults env_reset,pwfeedback


Save with Ctrl + X and then typing y when prompted. You will be prompted to enter a filename, press “Enter” to accept default.


Now close and re-launch command prompt to see if this worked. You’re welcome ;)
This is how it looks on my terminal:


Thank us by sharing this post.