Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Often when I mistype a command such as ls (e.g. I hit ENTER before I type 's') there is a long (~2s) delay after the terminal displays:

bash: l: command not found...

I can understand the reasons for a similar delay after an incorrect password is entered, per Why is there a big delay after entering a wrong password?. But why delay after an unrecognized command? Does FAIL_DELAY in /etc/login.defs affect this also?

share|improve this question
Maybe Fedora is now also using that horrible Ubuntu misfeature that tells you "This program is not installed, to install it, type ..."? The delay is then caused by searching the database of all installable packages. Try calling psql (part of PostgreSQL), which is probably not installed by default, but is hopefully in the repositories. – Ulrich Schwarz Nov 29 '11 at 18:51
What does echo "$PROMPT_COMMAND" output? – rozcietrzewiacz Nov 29 '11 at 19:28
echo "$PROMPT_COMMAND": printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}" – paislee Nov 29 '11 at 19:48
what echo $PATH prints ? your system is check there each time you hit the return key. – Hanan N. Nov 29 '11 at 21:22
up vote 13 down vote accepted

after some research i have found this:

  • try to uninstall the command-not-found package with $>yum remove command-not-found then install it again with >$yum install command-not-found (just in case you have that package installed on your system).

if that doesn't help try:

  • add this to your ~/.bashrc file:

    unset command_not_found_handle

share|improve this answer
Second suggestion removed the delay. I do not have the package command-not-found installed. Thanks! – paislee Nov 29 '11 at 21:53

I found that the best solution, at least on Fedora, is to modify the configuration file

as the biggest delay comes from the search for packages to install, if you modify SoftwareSourceSearch=true in SoftwareSourceSearch=false

the delay is almost 0 and you still get warned about misspellings, which can be useful.

share|improve this answer

Fedora uses something similar.

If you want to just remove this feature use:

yum remove PackageKit-command-not-found
share|improve this answer
Follow up: I forgot to mention if you remove this package you will get an error message: bash: /usr/libexec/pk-command-not-found: No such file or directory To fix this create the file after removeing the package, /usr/libexec/pk-command-not-found with the following: #!/bin/sh echo "Command not found: $1" This will print: Command not found: fail-command – user16852 Mar 21 '12 at 5:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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