Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 535.7K On-Premises Infrastructure
- 138.1K Analytics Software
- 38.6K Application Development Software
- 5.6K Cloud Platform
- 109.3K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71K Infrastructure Software
- 105.2K Integration
- 41.5K Security Software
What is this feature in bash called? How to disable?

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.
Answers
-
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/PackageKit.sh which is installed by the PackageKit-command-not-found package. If you remove that package then this behavior should be disabled.