Article 59FEV Does bash remember where it found an executable ?

Does bash remember where it found an executable ?

by
markus-n
from LinuxQuestions.org on (#59FEV)
... and how do I reset it ?

Hi,

I'm currently experimenting with firejail. It's a tool that can put applications in a sandbox. It comes with lots of predefined profiles for standard applications like firefox (hence the name), geany, meld, ...

However, I'm not happy with some of the profiles, e.g. for geany (a text editor) and meld (a diff/merge tool). I'm still learning to configure firejail, but in the meantime I prefer to disable it for those applications. Disabling works by removing a symlink from /usr/local/bin. During my experiments, I'm removing and re-adding the symlink back and forth.
( For those who are interested in more detail, the symlink points to /usr/bin/firejail, which in turn checks with which name it was called, then reads the corresponding profile, and starts the application with the same name in a sandbox. )
And here comes the problem:
Once bash had found e.g. meld in /usr/local/bin (the symlink), it will only look for it it there. If I remove the symlink try to start meld, bash will complain about /usr/local/bin/meld not found. But the original is still in /usr/bin. And $PATH is /usr/local/bin:...:/usr/bin:... so I thought it should work.
At least Code:which meld says Code:/usr/bin/meld
Does bash remember where it once found "meld" and refuse other locations from that moment on ?
And is there a way to make it forget that location (other than starting a new shell) ?latest?d=yIl2AUoC8zA latest?i=qzmW-Gn6TNA:7sXR879BC0M:F7zBnMy latest?i=qzmW-Gn6TNA:7sXR879BC0M:V_sGLiP latest?d=qj6IDK7rITs latest?i=qzmW-Gn6TNA:7sXR879BC0M:gIN9vFwqzmW-Gn6TNA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments