≡ Menu

Linux Login as Superuser ( root user )

Q. How do I login as superuser / root user in a Linux operating systems?

A. The superuser, or root, is a special user account used for system administration.

Linux superuser

In Linux and Unix like computer operating systems, root is the conventional name of the user who has all rights or permissions (to all files and programs) in all modes (single- or multi-user).

The root user can do many things an ordinary user cannot, such as changing the ownership of files and binding to ports numbered below 1024. The etymology of the term may be that root is the only user account with permission to modify the root directory of a Unix system.

Superuser login – How to become Superuser in Linux

Under Linux (and other Unixish oses) you use command called su. It is used is used to become another user during a login session or to login as super user. If Invoked without a username, su defaults to becoming the super user. It is highly recommend that you use argument – to su command. It is used to provide an environment similar to what the user root would expect had the user logged in directly. Type su command as follows:
$ su -Output:


Once you typed the root user password, you become super or root user.

See also:

Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 13 comments… add one }
  • ALHASSAN HADARU February 15, 2011, 8:43 am

    i like to learning more about linux

  • qsdf January 12, 2012, 9:23 pm

    It is interesting to notice how easy it is to find this information on the web, how to login as a superuser, and how it is difficult to find the information about how to log OUT of superuser (exit). Wouldn’t it make sense to put these things together ? I guess that someone who just learnt how to log in as a superuser would also immediately need to know how to log out.
    And by the way, your answer after “A” doesn’t answer the questions “Q” at the beginning of the article.

    • Dave November 20, 2015, 2:48 pm


  • Danji June 5, 2012, 11:51 pm

    Hey, i tried this but my linux said:
    Error with approval ( think thats how you translate it..
    its bothering me alot and i tripple checked the password it is correct

  • German Islas Jr June 9, 2012, 4:21 am

    what version of lunux are you using? if you are using any ubuntu based linux for example you, you can only use the super user to run comands, you cant stay loged in as the super user.

    Ex: to install an aplication, you would opne a terminal and enter

    sudo apt-get install name_of_application.

    the sudo or su comand will indicate to linux that you are trying to run the comand as the super user or administrator, but in ubuntu after the application is done installing it will go back to regular user to aboid any security breach. y have to realize that the when you are in super user mode it can be verry danguros becasue bc you can do anything, like deleting all you files and messing up your operating system.

    so in conclution you get that message because your linux you might not be running any other comands after the sudo or su comand.

    i hope that made sense.

  • shainy July 27, 2012, 5:36 pm

    i am grave trouble i forgot ma superuser password hw to recover it

  • vijay kumar August 3, 2013, 5:58 am

    I am new to linux, i want to learn more about linux as much possible. i am using ubuntu and suse.
    i try to log in as supper user by su command, and provide password i used to login my system but it shows Authentication failure. please guide me.

    Thanks and regards

  • rohit September 9, 2013, 6:33 am

    Earlier i used to login to root by typing ip address and port, i just remember the ip address but i forgot the port number, can anybody please help.

    • Chaos February 12, 2014, 6:53 am

      I think you are using telnet or ssh, if telnet it is port 23 and for ssh it uses port 22. Hope it helps.

  • rini sowmya October 2, 2013, 6:43 am

    i just now logged in as super user but i want to delete it.what i should do for that???

    • Caleb January 10, 2017, 10:14 pm

      All you need to do is type: Exit

      or press Control D

  • Manu May 25, 2014, 2:29 am

    thanks for this! learning linux command line scripts now after installing fedora in my nephew’s inspiron 1525, was wondering how to get to root user, other sites weren’t explaining well enough so again, thanks a million! :)

  • Caleb January 10, 2017, 10:10 pm

    Being a super user can be VERY dangerous so I suggest you know what your doing if your going to become a super user but another way to get root access is to type into the command line:

    sudo -i

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , ,