Terminal becomes unresponsive when a “sudo” password prompt is displayed

The terminal doesn't show the characters being entered when typing in a password field such as a sudo password field. The characters are still being entered—just type your password as normal and press Enter to continue.

$ sudo echo hi
Password: type here, then enter
hi

You can show asterisks when entering your password for sudo by editing the sudoers file.

  1. Open /etc/sudoers with visudo:

    EDITOR=nano sudo visudo
    

    I've used nano here, but feel free to use your preferred editor.
    visudo will check your file for errors before saving, otherwise you may not be able to sudo.
    You can backup the file with cp /etc/sudoers ~/Desktop.

  2. Add "pwfeedback" to the Defaults, replacing the first line with the second:

    Defaults env_reset
    
    Defaults env_reset,pwfeedback
    
$ sudo echo hi
Password: ************
hi