This question already has an answer here:
I want to cd into a directory from the terminal but access is denied, and typing
sudo cd (directory) returns an error about sudo not supporting the cd command. I can use
sudo gnome-terminal to launch a new terminal window with root privileges, but I want a solution that I can use from the same non-root terminal window. Is there a way to make the cd command compatible with sudo?