How to make password asterisks visible in Ubuntu terminal

Whenever you are asked to enter a password in an Ubuntu terminal, you enter your password without a visual display or feedback from the screen. In such a situation, it is likely that you can spoil your password by entering it incorrectly. This is the reason why visual feedback is so important. This will help you keep track of the number of characters you entered, especially when entering passwords so that you do not miss a single character or type additional characters. One such visual feedback is given by displaying asterisks (***) when typing a password. In this article, we will tell you how you can enable this feature in an Ubuntu terminal.

Making password asterisks visible in the Ubuntu terminal

To make password asterisks visible in an Ubuntu terminal, you need to follow these steps:

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

Now enter the command:

sudo visudo

at the command prompt and press Enter. This command is shown below:

Run visudo command

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

Enter your password to gain administrator privileges.

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

Sudoers file opened in editor

Using the arrow keys, scroll down to the line Default is env_reset, This line is highlighted in the following image:

The default string is env_resets

Change this line by typing pwfeedback in the end. This is shown below:

Add pwfeedback to the line

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

Save file

He will ask you to write a file name. Only press enter select by default.

Press enter when asked about the file name.

After this step, you will return to the normal terminal window. Only output type and press enter or click on the red X in the upper left corner to close the terminal window.

Now, the next time you open the terminal and type any command using sudo, you can view the asterisks on the password you entered, as shown below:

Entering a password displays asterisks

Conclusion

This way you can make password asterisks visible in the Ubuntu terminal by following a few simple steps. These settings will be saved for future use unless you change them by changing this file again.

How to make password asterisks visible in Ubuntu terminal

Sidebar