I would like to force default execution to happen from my home directory.
However, regardless of what I try, it seems that the whereis utility finds programs to be in /bin instead of /home/user.
E.g. if I do
export PATH=.:$PATH
I can echo $PATH to see that this is indeed updated correctly.
However, if I now type ls, /bin/ls will still be executed. Indeed, when I look in whereis ls, I see that it finds ls in /bin/ls first, and then in /home/user/ls.
Why is that? How can I force it to use /home/user over /bin?
This is bash 4.4.12 on Debian 9.6.
whereis,which, etc. are external programs. Usetype -aorcommand -vetc. instead, which are builtins. – muru Jun 12 '19 at 02:51whereis,which, etc. are external programs, they shouldn't be affceted by bash's cache, should they? @AlphaCentauri Adding "." to PATH adds the current directory to your search path, which only equals your home directory as long as you don'tcdto some other directory. – Johan Myréen Jun 12 '19 at 07:11