Whenever you are asked to type a password in Ubuntu terminal, you insert your password without getting any visual display or a feedback from the screen. In such a situation, there are the chances that you may mess up with your password by entering it wrongly. This is the reason why visual feedback is so important. It helps you to keep a track of the number of characters that you have entered especially while typing passwords so that you may not miss out any characters or type in extra characters. One such visual feedback is given through the display of asterisks (***) while typing passwords. In this article, we will tell you how you can enable this feature in Ubuntu terminal.

Making Password Asterisks Visible in Ubuntu Terminal

For making password asterisks visible in Ubuntu terminal, you need to perform the following steps:

Launch the terminal by pressing Ctrl+ T or clicking on the terminal icon from the taskbar or searching for the terminal in the search window by typing terminal and pressing enter. The newly opened terminal window is shown below:

Ubuntu Terminal

Now type the command:

sudo visudo

in command prompt and press enter. This command is shown below:

Run visudo command

As soon as you will press enter, you will be asked to enter your password.

Enter password to get administrative privileges.

After you entered your password, a system file will open with nano editor in the terminal. This file is shown below:

Sudoers file opened in Editor

By making use of the arrow keys, scroll down to the line Defaults env_reset. This line is highlighted in the following image:

Defaults env_resets line

Modify this line by typing, pwfeedback at the end. This is shown below:

Add pwfeedback to the line

After this modification, press Ctrl+ X to save the changes and press y in response to the question shown below:

Save the file

It will ask you a filename to write. Just press enter to choose default.

Press enter when being asked for the file name

After this step, you will be returned to the regular terminal window. Just type exit and press enter or click on the red cross located at the top left corner to close the terminal window.

Now, whenever you will open terminal next time and type any command with sudo, you will be able to view asterisks against your entered password as shown below:

Asterisks shown when entering a password

Conclusion

In this way, you can make the password asterisks visible in Ubuntu terminal by following a very few simple steps. These settings will be saved for future unless you change them otherwise by modifying this file again.

 

How to Make Password Asterisks Visible in Ubuntu Terminal
Avatar

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.