Bugzilla – Bug 310
sudo cd does not work
Last modified: 2008-11-02 20:08:06 MST
I don't understand the following behavior, which I see on (at least) Debian lenny as well as Gentoo. faheem@orwell:~$ sudo cd Mail/ sudo: cd: command not found This works for pretty much any other command I can think of. There are two possibilties: 1) This is a bug, which makes me wonder why nobody else has reported it. it was present in etch and is still present on upgrade to lenny. I've run into it many times, and finally decided to report it. 2) I'm missing something. Faheem.
From the TROUBLESHOOTING file. Q) When I try to use "cd" with sudo the command completes without errors but nothing happens. A) Some operating systems include a /usr/bin/cd command for reasons unfathomable. A "cd" command is totally useless since a child process cannot affect the current working directory of the parent (your shell).