Linux / BSD Shell Doesn't Recognize Newly Installed Binaries

by on June 16, 2009 · 0 comments· LAST UPDATED June 17, 2009

in , ,

I've installed few software using tar ball format under Linux or FreeBSD ports using make command. However, my system doesn't recognize the installed command. I've to reboot the system or log out and log in again to use the same. How do I fix this problem?

Almost all modern shell remembers program location and cache the result to speed up operation. Shell has something called hash table which is nothing but the contents of the directories in the path ($PATH) variable to be recomputed. To flush cache simply type the following under bash:
# hash -r
If you are using CSH, type:
# rehash
This is needed if new commands are added to directories in path while you are logged in. This should be necessary only if you add commands to one of your own directories, or if a systems programmer changes the contents of one of the system directories. Also flushes the cache of home directories built by tilde expansion.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , , , , , , , , , ,

Previous Faq:

Next Faq: