Linux – About executable paths in CentOS or any Linux machine

About executable paths in CentOS or any Linux machine… here is a solution to the problem.

About executable paths in CentOS or any Linux machine

I

installed vim on my computer and I see that there are two executables in my operating system, one in /usr/local/bin and the other in /usr/bin. I want to use /usr/bin vim However, whenever I type vim, it uses /usr/local/bin that I don’t want. So, to set vim’s PATH to /usr/bin instead of /usr/local/bin. How can I do this? Because, vim in /usr/local/bin isn’t great, I mean it’s like vi editor.

Thanks

Solution

It depends on your shell. If you are using bash, you can put /usr/bin at the beginning of your PATH by adding the following to your ~/.bashrc file:

export PATH=/usr/bin:$PATH

Questions like this are more suitable for unix.SE, by the way.

Related Problems and Solutions