sudo cd /root gives 'sudo: cd: command not found'.
Kernel 2.6.21.5, Slackware 12.0
Hi: Code:
# cat /etc/sudoers Code:
pete$ ls /root Code:
pepe$ echo $SHELL |
Precisely because "cd" is a shell builtin and not a binary, and sudo is not bash (nor even a shell). So sudo can't find any "cd" command. That's how it works, so you'll need to find some way around using "sudo cd", like by using complete paths in your commands or just doing "sudo bash".
|
Try:
Code:
sudo -i |
Not sure about Slackware but for Ubuntu you can use
sudo su cd /root |
Thanks
Thanks for the help. That did the trick for me on Linux Mint.
Quote:
|
All times are GMT -5. The time now is 06:17 PM. |