I found the strangest thing
sudo cd $pwd
sudo: cd: command not found
I am able to cd as a normal user.It seems that PATH is not set properly for su.
How do I fix that?
I found the strangest thing
sudo cd $pwd
sudo: cd: command not found
I am able to cd as a normal user.It seems that PATH is not set properly for su.
How do I fix that?
You can't do cd
like below,
sudo cd $pwd
But you can do,
sudo su
cd $pwd
You don't change directory as sudo.
sudo = Superuser Do [something]
what you can do is login as a superUser
sudo su
do what you want (change directory, execute, edite file, etc). eg:
cd [the_directory]
when you are done. logout superUser:
exit