Skip to content
Advertisement

Make a program in path preferable instead of another

There is a program in the PATH variable installed by root, but I installed a more recent version in my local.

There is any way to make my program preferable instead of the root?

Sorry for my bad english.

Advertisement

Answer

put the preferred directory in front of the other one. It will pick up the first one it finds.

export PATH=/this/path/is/searched/first:/this/one/is/second:$PATH
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement