LINUX : How to Log in as Root (Ubuntu 10.04)

7,912

Solution 1

I want to be able to delete/edit/open any files from anywhere on my computer.

Elevate using gksu from the terminal

gksu nautilus will start nautilus, the file manager as root.

And as hotei mentioned - be careful

Solution 2

Once you've logged in as root you can (usually) run other programs - such as gedit to edit files or nautilus (file manager). It isn't (usually) wise to do this unless you need root permissions to do something but it's your system.

Solution 3

If you really want to be root on an Ubuntu box, you've got to enable the root account by assigning it a password. A simple

sudo passwd root

will do the trick. You'll have to enter your password first (to get past the sudo hurdle), then set a password for the root account. All that said, don't do this! The only remotely legit reason I can think of for this is so you can set up password-less ssh logins between boxes as root, and that's not a good enough reason, in my opinion.

Share:
7,912

Related videos on Youtube

Adam Halasz
Author by

Adam Halasz

Hi, I made 37 open source node.js projects with +147 million downloads. Created the backend system for Hungary's biggest humor network serving 4.5 million unique monthly visitors with a server cost less than $200/month. Successfully failed with several startups before I turned 20. Making money with tech since I'm 15. Wrote my first HTML page when I was 11. Hacked our first PC when I was 4. Lived in 7 countries in the last 4 years. aimform.com - My company adamhalasz.com - My personal website diet.js - Tiny, fast and modular node.js web framework

Updated on September 17, 2022

Comments

  • Adam Halasz
    Adam Halasz over 1 year

    I want to use the whole operating system as an administrator.

    I know I can log in as a root in the Terminal by typing this:

    su
    Password
    

    But in this way I'm logged in only in the terminal.

    I want to be able to delete/edit/open any files from anywhere on my computer.

    EDIT:

    I have a server in /Files Systems/opt/ and my PHP files says that I need to give permission to make it work that's why I need permission for everything.

    • hotei
      hotei over 13 years
      The php message did NOT say you needed to give it root permissions. It says it needs to exist and be readable. That's a whole different thing with multiple possible solutions that don't involve root at all.
  • Adam Halasz
    Adam Halasz over 13 years
    Thanks @hotei for your answer, you are true with nautilus but the problem is that I'm not the one who needs to open/edit/delete the files, I have a server on it and my PHP files says that I need to give permission to make it work.
  • hotei
    hotei over 13 years
    You may need root perms to install php, but it's not required afterwards. Your php files will be executed by the web server which is usually running as a daemon (started when the system is booted). My web files (*.php) are not owned by root but rather by me, so I don't need root permission to change them. Maybe I'm not understanding your problem...
  • Adam Halasz
    Adam Halasz over 13 years
    check out my question here stackoverflow.com/questions/3739754/…
  • hotei
    hotei over 13 years
    @CIRK: FYI - I commented on your question on stackoverflow.