Bash: Handling Command Not Found | Linux Today

Bash: Handling Command Not Found

Written By
MF
Mitch Frazier
Apr 24, 2010

“After a recent O/S version upgrade (to openSUSE 11.2) I noticed
that bash started being a bit more intelligent when I did something
stupid: it started giving me a useful error message when I typed
the name of a command that wasn’t in my PATH but that was in an
“sbin” directory. My reaction at the time was “huh, that’s nice”,
but today I decided I needed a bit more information.

As an example of this behavior, if I type ifconfig while not
logged in as root I get the get the following:

$ ifconfig
Absolute path to ‘ifconfig’ is ‘/sbin/ifconfig’

Complete
Story

MF

Mitch Frazier

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.