this post was submitted on 17 Mar 2024
1166 points (97.5% liked)
Programmer Humor
19497 readers
1137 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If you execute a binary without specifying the path to it, it will be searched from the $PATH environment variable, which is a list of places to look for the binary. From left to right, the first found one is returned.
You can use
which cat
to see what it resolves to andwhereis cat
to get all possible results.If you intentionally wants to use a different binary with the same name, you can either directly use its path, or prepend its path to $PATH.