I noticed the Linux shell command 'which' does NOT show an executable file although it is alredy on the search path.
More specifically, my $PATH includes '~/.local/bin'; an executable file is ~/.local/bin/charm. 'which charm' returns nothing although I can run 'charm' with no problem. I am using Ubuntu 16.04 and bash
The issue depends on Linux distribution. If I log on to another machine of RHEL 6.10, the command 'which charm' works fine for the same executable.
The issue may also relate to nfs mount. On Ubuntu 16.04, the command 'which' seems to work fine for executables on local disks, for example, 'which which' shows '/usr/bin/which', but it does NOT find execuatables on nfs paths, which is the case for my '~/.local/bin'.
I searched online but couldn't find exaplaination. Is there a way to make the command 'which' under Ubuntu show all mached executables on path including nfs mounts?