Solved vim: Command not found, on user.

rigoletto@

Developer
Hello,

I installed vim-lite and it work as expected on root, but when I try to use it on user:

Code:
vim: Command not found.

I do not know if it is intended or not.

PS. vi works.

Thanks!
 
Assuming your user is using one of the Bourne style shells such as sh or bash try
Code:
hash -r

Sometimes a shell has to reread its paths to acknowledge a new command.
 
Hi,

The installation is new, so there was not anything important related to that user. I deleted he and created again. Now it works. :)

Thanks!
 
You're welcome. :) However, remember to learn fixing problems, instead of using the delete/recreate approach. This will help you a lot in your journey with Unix systems, and it's one of the beauty of Unix itself. :)

P.S. Don't forget scottro's suggestion: when you install a new program, use hash -r. ;)
 
You just had to add /usr/local/bin to your $PATH in ~/.profile:
Code:
export PATH=/usr/bin:/bin:/usr/local/bin
If you need to add other directories, put them there divided by a : .
 
You just had to add /usr/local/bin to your $PATH in ~/.profile:
Code:
export PATH=/usr/bin:/bin:/usr/local/bin
If you need to add other directories, put them there divided by a : .

Ok, I think understood. I created the user with csh shell, the old one was created with sh but I changed to csh later.

On .profile there is:

Code:
#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH

commenting it out does not helped because csh uses setenv instead of export.

So, setenv PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin did the trick.

Thanks! :beer:
 
Back
Top