วิธีเป็น superuser in Linux

Ref –> Linux Login as Superuser (root user)

How to become superuser in Linux

Let us see some examples of the su and sudo command to become superuser in Linux.

Become a superuser in Linux using sudo command
You must be part of special secondary group on Linux:

  • sudo group on a Debian or Ubuntu Linux
  • wheel group on a CentOS/RHEL/Fedora/Oracle Linux
  •  
    You can see your secondary group membership by running either groups command or id command
    $ groups
    $ id

    Next run the following command to become a root/super user:
    $ sudo -i
    When promoted type your password to gain root shell
    and when need to logout use
    $ exit

    Leave a Reply

    Your email address will not be published. Required fields are marked *