show asterisk for password in linux

How to Show Asterisk for Password in Ubuntu

By default, Linux does not show anything when you type password in its terminal. This can be confusing for many users as they cannot understand if they have typed the right password or not. In this article, we will look at how to show asterisk for password in Ubuntu. In fact, you can use these steps in other Linux distributions also.


How to Show Asterisk for Password in Ubuntu

Here are the steps to show asterisk for password in Ubuntu.


1. Open visudo

Open terminal and run the following command to open visudo tool that allows you to customize your terminal by safely editing /etc/sudoers file.

$ sudo visudo


2. Display Asterisk for Password

Using navigation keys, look for the following line.

Defaults env_reset

Update it to the following.

Defaults env_reset,pwfeedback

Save and close the file by typing Ctrl+X. You will see a prompt, enter Y to confirm.


3. Verify asterisk display

Run the following command to invoke password prompt.

$ sudo apt update
OR
$ sudo cd /root

In this short article, we have seen how easily you can enable visual feedback for password prompts in Linux. This is a simple yet powerful trick that helps many users to understand if they are typing their password right.

Also read:

How to Verify PGP Signature of Downloaded Software
How to Convert RPM to DEB File
How to Install DEB File in Linux
How to Provide Sudo Access to User in Linux
How to Kill Process Running on Specific Port

Leave a Reply

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