Forum Stats

  • 3,853,475 Users
  • 2,264,225 Discussions


What is this feature in bash called? How to disable?

Jcecere-Oracle Member Posts: 3 Employee

Using bash in OEL (say 8), and I make a typo, it seems that bash tries to invoke a yum process to try and find my typo. For example:

$ ocker-compose down

bash: ocker-compose: command not found...

At the ..., it's hanging trying to invoke yum (I think) to find an rpm with the command called ocker-compose. What is the name of this feature in bash? More importantly, how do I disable it? I'm not fond of the idea of bash hanging every time I make a typo for ARGV[0].

I've had no luck with Google, probably because I don't know what this feature is called.

The bash man page doesn't seem to reveal anything about this either.



  • The feature is implemented using the bash command_not_found_handle function. If this function is defined it is executed when a command can't be found. On OL this function gets defined by /etc/profile.d/ which is installed by the PackageKit-command-not-found package. If you remove that package then this behavior should be disabled.