How To Make Sudo Command Passwords Visible in the Terminal
Whenever you use
sudo on Ubuntu, the terminal will ask you to enter your user password.
That’s fine. We’re all used to that. It’s a great security measure.
But here’s the rub: the terminal doesn’t offer any sort of visual feedback as you type in your password. This confuses and confounds new users, who are often left uncertain as to whether they’ve entered anything at all!
Here’s a gif of me entering my password:
Yeah, zero feedback.
It’s a small rub, granted. Once you know that the lack of visual indication is by design …you move on with your life and accept it!
But — and it’s a niché but — if it niggles away at you each and every time you’re asked to enter your password; if you’d rather see a few traditional asterisks (stars) sprouted with each keystroke, here’s a quick how to especially for you.
Make ‘sudo’ Password Entry Visible
You don’t need to have read this blog for too long to know that I am incredibly typo prone. I type ridiculously fast — faster than my ability allows!
This means I regularly enter my password incorrectly and have to start it over. With some asterisks up on show I can, at least, get some gauge of whether I’ve fudged a few keys too many.
- Open a new Terminal window (
Ctrl + Alt + T) and enter the following command:
- Use your keyboard navigation keys (or mouse scroll wheel) to move to the line that reads:
Move the square box to the end of this line and add the following text so that it reads:
Ctrl + Xto complete the edit, followed by
Yand Enter/Return to save the changes entered
That’s all there is to it. The next time you use sudo you’ll see pretty little asterisks appear as you enter your password.
sudo – now with more presence
Ground-breaking, life-changing, experience-altering this hack isn’t, but it’s nifty to know nonetheless.