How does Linux find a command when you type it?
BeginnerConceptFilesystem Hierarchy, Inodes & Links
Answer
The shell checks, in order: aliases, shell functions, builtins, then each directory in $PATH from left to right, caching results in a hash table.
type -a ls
command -v kubectl
echo $PATH
hash -r # clear the cache after moving a binary
More on Filesystem Hierarchy, Inodes & Links
Explain the purpose of the main top-level directories in the FHS.BeginnerWhat is the "/usr merge"?IntermediateWhat are /proc and /sys?BeginnerWhat is an inode? What does it store and what does it NOT store?BeginnerA disk shows free space but you get "No space left on device". Why?IntermediateWhat is a hard link?Beginner