How2 enable visual feedback when typing sudo Ubuntu 22.04
By default, Ubuntu (including version 22.04) does not provide visual feedback when typing the sudo password in the terminal. However, you can enable this feature by editing the sudo configuration file. Here's how to do it:
Open the sudo configuration file with a text editor. In Ubuntu, the file is located at /etc/sudoers. To open the file with the Nano text editor, type the following command in the terminal:
sudo nano /etc/sudoers
Look for the following line in the file:
Defaults env_reset
Add the following line below it:
Defaults pwfeedback
The resulting lines should look like this:
Defaults env_reset
Defaults pwfeedback
Save the file and exit the text editor. In Nano, you can do this by pressing Ctrl+X, then Y, then Enter.
Test the new setting by running a sudo command in the terminal. When you are prompted to enter the password, you should see asterisks (*) or dots (•) as you type.
Note that enabling visual feedback for the sudo password can be a security risk if other people can see your screen while you are typing. Additionally, editing the sudo configuration file can be risky if done incorrectly, so make sure to double-check your changes before saving the file.
This is very handy if you have a very young or old, inexperienced or handicapped person.