Saturday 2 June 2018

Why won't "sudo cd" work?


Why typing sudo cd whatever won't change the directory?



Answer



cd is a shell builtin. sudo only works with executables. You could do sudo sh -c 'cd dirname' but as soon as the shell exits, you're returned to the directory you started from. If you say what it is you're trying to accomplish then I can help you find a way to do that.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...