How to make terminal show *** when entering passwords

When entering sudo commands in Ubuntu Terminal, you are first prompted to enter your password. However, no visual feedback is shown and this can be a bit embarrassing for beginners coming from other environments.

Simply follow these simple steps and you will be able to see asterisks as you type:

  1. Open Terminal (Ctrl-Alt-T)
  2. sudo visudo
  3. This will open the configuration file /etc/sudoers in terminal in nano editor. Look for the line where it shows
  4. Defaults      env_reset
  5. We will add a command to show feedback for passwords as pwfeedback. You can either add it on the same line separated by a comma, or on a new line with the keyword Defaults.
  6. Defaults    env_reset, pwfeedback
  7. or
  8. Defaults      env_reset
    Defaults      pwfeedback

 

To quit, press Ctrl+X, press Y to save your changes and press enter to use the same filename.

That’s it!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.