Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

Jcecere-OracleOct 5 2021

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.

Comments

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.

1 - 1

Post Details

Added on Oct 5 2021
1 comment
232 views