Right now by default iam logged in with my account and i want to access some files/folders in my machine, but iam unable to access(also no copy/paste) those because iam not logged in as root user. So is there a way to gain root access over those files/folders in Ubuntu. I know i can do su in command prompt and change the permissions but what is the other way to gain root access.

link|improve this question
See also Get root access for copying files to /usr/share/…? on Ask Ubuntu, and (not Ubuntu-specific so not everything will apply) How do I run a command as the system administrator (root). – Gilles Dec 1 '10 at 0:35
feedback

3 Answers

CarlF is on point. sudo is the command that you want to use to act as a root user.

You must prefix all of your commands with sudo in order to act as the root user. Also, in Ubuntu, there is no root user (unless you re-enable it), so the computer does not have a root password -- you only have to provide your own password if you exist in the sudoers file in /etc (I believe) in order to gain root capabilities.

link|improve this answer
feedback
gksu nautilus

is probably what you want. If you enter it in a terminal or with Alt+F2, it will first ask for your password and then open a folder view of your home directory, from where you can navigate normally. Or you could use

gksu nautilus foldername

to access the folder you want directly. If you are using Kubuntu, replace "nautilus" with "dolphin".

link|improve this answer
feedback

Try typing man sudo.

link|improve this answer
why can't i directly access a folder by providing my root password for authentication :( – dsharma Nov 30 '10 at 19:08
You must prefix all of your commands with sudo in order to act as the root user. – Nitrodist Nov 30 '10 at 19:23
If you want to enter a bunch of commands as root in Ubuntu and don't want to type the bothering sudo everytime, do a "sudo su" to change into superuser. But remember to do an "exit" as soon as you're done doing root stuff... – celebdor Nov 30 '10 at 19:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.