0

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?

Martian2020
  • 1,039
  • 7
  • 20
  • 1
    Try `type -a abc` - see [Why not use “which”? What to use then?](https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then) and maybe also [How do I clear Bash's cache of paths to executables?](https://unix.stackexchange.com/questions/5609/how-do-i-clear-bashs-cache-of-paths-to-executables) – steeldriver Jan 25 '21 at 02:45
  • @steeldriver, when I start new instance of bash the output as expected. thank you! – Martian2020 Jan 25 '21 at 02:51

0 Answers0