I have sudo access on my friends server, running centos-6.3, but when I try to run some commands like
sudo vim /var/www/html/index.html I get an error
sudo: vim: command not found I can, however, run
sudo su and then
vim /var/www/html/index.html and it works as expected.
echo $PATH and
sudo echo $PATH both yield:
sudo which vim however yields:
which: no vim in (/sbin:/bin:/usr/sbin:/usr/bin)
I've tried adding
/root/.bashrc which as fixed the issue when using
sudo su but not just
How do I get
sudo <command> to work?