How to make password visible in the Terminal in Linux. A quick tutorial on how to show asterisks (*) when you type password in the Terminal in Linux Ubuntu or other Linux Distros.
To make password visible (asterisks), we will edit the “/etc/sudoers” file. We will open the file and change the setting to display passwords as asterisks. To do so, open Terminal and type the following command and press Enter key.
sudo visudo
Type the password when prompted and press Enter. Please note that no password (asterisks) are displayed at the moment as the change is to be done and then applied. Also keep in mind that always edit the sudoers file using the visudo command as shown above.
Once the /etc/sudoers.tmp file is open, search for Defaults env_reset and modify it. Search for the line that reads Defaults env_reset
and change it to Defaults env_reset,pwfeedback
.
Once you have made the change, save and exit. Press Ctrl + X and then type a “Y.” Please read the instruction at the bottom of the window to save and exit.
Now restart the terminal and you should be able to see the password as asterisks when you type in your password.