0

On the command line (usually bash, and somtimes zsh), I sometimes need to enter a password to authenticate myself. in fact, I need to do that several times a day.

Sometimes, you fail typing and instead of hitting return (which is bad sometimes as it is recorded by the server) and type it another time, is there a shortcut (like Ctrl-R for searching the history) to wipe out the typed password and start anew?

4
  • 1
    @roaima I think OP means to clear the password input before hitting enter (without interrupt and retry, or holding backspace etc)
    – thanasisp
    Dec 12, 2020 at 13:41
  • 1
    @thanasisp that's what I was thinking as well - perhaps How can I delete a word backward at the command line (bash and zsh)? is what the OP is looking for? Dec 12, 2020 at 18:03
  • @steeldriver yes this seems to have more information.
    – thanasisp
    Dec 12, 2020 at 18:26
  • My answer is <kbd>Ctrl</kbd>-<kbd>U</kbd> just tested successfully, very useful ! It was found in the first question, while the second is unrelated. Thanks!
    – meduz
    Dec 16, 2020 at 19:56

0

Browse other questions tagged .