-
which
- finds executable in your
$PATH
- lives in /usr/bin/which
- finds executable in your
-
type
- determines if command is alias, function, built-in command, cached executable (hashed), binary in
$PATH
, etc - shell builtin
- determines if command is alias, function, built-in command, cached executable (hashed), binary in
Last active
April 2, 2023 09:39
-
-
Save miguelmota/bb7f8587047c7dcb5fe38b41ba2d357d to your computer and use it in GitHub Desktop.
Bash `which` vs `type`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
hash -r
to remove the cached executable. Sowhich
andtype
will resync.