Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

Newbee to Ubuntu.
I've just installed Ubuntu 14.04.
How do I log in as root? Alternatively, when performing su, what's the default root password? Thanks in advance.

share|improve this question

marked as duplicate by Eliah Kagan, Rmano, Alaa Ali, Eric Carvalho, hbdgaf Aug 11 at 22:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
here in ubuntu su can is been replaced by sudo which will automatically deroot you after closing the terminal –  agha rehan abbas Aug 8 at 2:28
    
Assuming your goal is to run commands as root (not specifically to log in or su as root), you should use sudo, as explained in this guide. So this may be a duplicate of How do I run a command as root? (the answer) or How to become root?. See also What are the benefits of sudo over su?, this general question, and this one about running GUI apps as root. –  Eliah Kagan Aug 8 at 2:56

1 Answer 1

root, as a user, has a disabled password for your protection. To run a program as root, use either sudo or gksudo, if the program is terminal based or graphic based. For example, to edit your rc.local file, you would open a terminal and type gksudo nano /etc/rc.local

The password for performing items with the root permissions is the same password you logged on with.

There are methods for enabling "root" as a user - if you have a need for this, you will find the appropriate links.

share|improve this answer

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