How to Show Asterisks for Password in Ubuntu Terminal

If you are new in Linux world, you might have heard about Terminal. Terminal is one of the most essential parts of any Linux distribution. You can do almost anything by making use of various Terminal commands.

Actually, Ubuntu or any other Linux OS is pretty different from any other platforms i.e. Windows, Mac etc. It is more secure than Windows because it requires password to make any kind of change.

But the problem is, when you enter password in Ubuntu Terminal after entering any command, you cannot find anything. Sometime it will be much difficult for you whether Terminal is capturing your password or not. There are some people who often make their password sure by checking the asterisks count. If you are one of them, you will surely get problem due to this.

But a small change in your system file can show you the password. The change requires a couple of seconds and that’s all.

How to show asterisks for password in Terminal?

This is however very easy. Just open your Terminal. You can press Ctrl + Alt + T or make a search. After that enter the following command in Terminal;

sudo visudo

Show Asterisks for Password in Ubuntu Terminal

Now you may have to enter your password. Then, you will get a screen something like the following picture;

Show Asterisks for Password in Ubuntu Terminal

You will surely get the following lines;

Defaults     env_reset

Defaults     mail_badpass

Now, point your cursor at the end of the first line and hit enter. Now add the following line after Defaults        env_reset

Defaults    pwfeedback

Show Asterisks for Password in Ubuntu Terminal

(Make sure the space between Defaults and pwfeedback is a tab)

After adding the line, press Ctrl + X. It will ask you whether you want to save the change or not.


Just press Y and hit enter again. Then, you will be asked to write the file name.

Just hit enter. After that, you can close your Terminal because you have already done.

Save System File

I am sure that this tiny trick will let you get the asterisks while typing password in Ubuntu Terminal.


Please enter your comment!
Please enter your name here