How to reset Bash`s Cache

Today I learned Bash has a cache for recent running command. When I’ve run iPython previously in a shell session, that command was cached. Thats why even I run in virtualenv it still run my local machine’s ipython. hash command save my life. hash command in Linux system is the built-in command of bash which is used to maintain a hash table of recently executed programs. It remembers and shows the program locations. It will give the full pathname of each command name.

From your bash shell, run: 

hash -r

This command will reset bash’s cache. it refered to the version of iPython that I installed in my virtual environment.

9 Ekim 2019

Posted In: bash, cache, cache reset, hash, virtual environments, virtualenv

WP Twitter Auto Publish Powered By : XYZScripts.com