2/19/2016

Linux: Switching to ROOT user using SUDO

When you want to navigate to a different directory, but the directory is restricted, you may want to switch to the root user to gain access.

You might think this would work, but it doesn't:

cd /some/directory/with/restricted/permissions/

It will come back with an error saying that cd is not a recognized command.

So, what you can do is switch to the root user like this:

sudo -i

Once you've done that, you should see a root user prompt, and you should be able to change directories or whatever else you don't have access to.

No comments :

Post a Comment