How to login as a superuser / root user in a Linux like operating systems?
The Linux command su (substitute user) is used to switch from one account to another. It will prompt User for the password of the user switching to.
You can use the su command to become a superuser / root user in a Linux like operating systems. This command requires you to put in your root password.
Run the following command in your shell to become super user.
[[email protected] ~]$ su -
This will ask you for your password. Once entered correctly, you will become the superuser (root)
To log out of a super user simply use exit command
[[email protected] ~]# exit
That’s all for now. Have questions, post them in the comments.