When I type in bash (Linux Mint 20) abc
I get output same as typing /usr/bin/abc
, different from /usr/local/bin/abc
. I have done web search, have read https://superuser.com/questions/238987/how-does-unix-search-for-executable-files, then https://askubuntu.com/questions/254639/is-there-a-way-to-echo-an-alias, https://askubuntu.com/questions/39309/how-do-i-find-the-version-of-bash-i-am-running. Below what I tried to check and still no idea for the reason:
which -a abc
/usr/local/bin/abc
/usr/bin/abc
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
alias abc
-bash: alias: abc: not found
echo $BASH_VERSION
5.0.16(1)-release
Anything else to try?
type -a abc
- see Why not use “which”? What to use then? and maybe also How do I clear Bash's cache of paths to executables? – steeldriver Jan 25 '21 at 02:45