Centos – Command to refresh binary paths in CentOS

binarycentospath

This is probably really easy and I just can't seem to find it.

I'm moving binaries around between /usr/bin and /usr/sbin, and even though both folders are in my $PATH, moving one binary to the other causes the system to continuously look for it in its original place.

Anyone know why this is, and if there is a command to refresh it?

Best Answer

For bash

hash -r

should cause the shell to forget about the remembered locations.