-
execution path
hello all,
I was wondering if there is a way to change the exec path for some application application (besides doing the ln -s ?
ex.
$ vim
-bash: /usr/local/bin/vim: No such file or directory
$ which vim
/usr/bin/vim
how do i permanently change that path from usr/local/bin/vim to /usr/bin/vim ???
thanks !
-
That's odd... that output makes no sense to me. If finds /usr/bin/vim, it should automatically execute that file when you call it. The only way it would even know that vim is in /usr/bin/vim is if /usr/bin is in your $PATH variable.
Could you run and post the output here?
-
Code:
echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/pavel/bin
-
Hmm... one possible issue that you have something in /usr/local/bin that bash wants to use as vim but then throws an error about it not being there. Out of curiosity, let's rearrange the directories in your PATH. Run this command:
Code:
export PATH=/usr/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/home/pavel/bin
And then try executing vim again. All that command does, btw, is rearrange the order of some variables; it shouldn't have any obvious affects (except, hopefully, vim will work).
Note that the export command will only set the PATH variable to that new value in that particular instance of bash. When you close the terminal, or switch to a different one, PATH will revert to its old value. This is just some testing for now