I don't know it's just my experience or not, but every time I type a wrong password in terminal, it takes 2 or 3 seconds to respond. And I think It's a very long time for a computer. Does anybody know the reason?


This is a security feature. Your machine can hash and check the password near instantly. To prevent someone from trying to brute force the password there is an intentional delay added in.

The delay is done in a few common ways. One, as you describe, is to add a couple seconds to any wrong input. Another is to add a longer delay after several wrong attempts (this is common on web interfaces). A third is to use some sort of exponential back off, so the more attempts the longer the delay. Finally, some systems just lock you out after a small but meaningful number of attempts.

  • 3
    For logins on Linux specifically, this is often implemented using pam_faildelay (see /etc/pam.d/login on Debian-based systems). Oct 20 '20 at 15:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.