By default, Ubuntu doesn’t show anything when you type passwords in the terminal. They made this decision for security reasons. Shoulder-surfing is a thing. People looking over your shoulder could see how many characters you entered, thus narrowing down the number of possible passwords.
This article will show you how to show asterisks on the screen, as some folks prefer, when you enter your passwords in the terminal. This tip is actually rather easy and shouldn’t take very long. It’s not even all that advanced, and it can be undertaken by most anyone. You should at least understand the implications before changing the behavior.
Frankly, it’s a perfectly acceptable choice to not show anything when typing sensitive material, but others prefer to have some feedback. It makes it easier for slower typing people to keep track of where they are, for example. On top of that, there are many situations where you really don’t have to worry a whole lot about people shoulder surfing.
When you’re using a computer that’s never going to be out in public, it’s probably not much of an issue if you show asterisks. If it’s a laptop that you use in coffee shops and you’re security conscious, you may want to leave it the way it is. You have a choice. You can leave it the way it is, or you can go ahead and change it. Linux is pretty awesome like that. You get to make the decisions!
Passwords With Asterisk Feedback:
First, let’s crack open the terminal. Press
sudo nano /etc/sudoers
Enter your password and hit enter, of course. (Mark it on the calendar! This should be the last time you enter your password in the terminal without some visual feedback!)
Use the down arrow until you’re at the start of the line that says:
Press the ENTER button. This should move that line down and leave a blank line above it. Use the arrow button to move up to that blank line and enter:
Note: This spacing isn’t technically required. It is done for convention and to aid in ease of reading/processing information-dense more accurately and swiftly. You can also probably put the new line anywhere in that file. For some reason, that’s how I have it in my notes.
When you’re done, you will then need to save the file. As this is nano, press
That’s it. That’s everything. You will probably need to close and reopen all of your terminals to notice the difference. Then you can test it by opening a new terminal window and tying in:
sudo apt update
Type your password when prompted and you’ll hopefully see some asterisks as feedback. It should look a little like this:
As mentioned above, Ubuntu made this change for security reasons. If you change this, you’re making it so that people can see how many characters you typed when you entered your password. Of course, they can also count how many times you pressed a key on your keyboard. Just be aware of it and decide for yourself.
And there you have it, another article published. This one is about the passwords you type and if they’ll give you any feedback by appearing as asterisks on the screen. It’s a decision that you get to make, and the security implications are real – but not universal. You may prefer asterisks when typing your passwords, or you may prefer the defaults.
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.