A brief description of the super user known as root
In Linux the super user or administrator account is called root. By default when configuring a system the default user will have the ability to become root.
In the linux terminal the dollar sign $
demonstrates a regular user
Whereas the hash#
illustrates the root user
the #
also denotes a comment in shell scripting so try not to be confused
There are multiple ways to become or imitate root.
You can become root by running sudo su -
or sudo -i
However, because the root account has not limitations; critical issues can occur from simple typos as such it is preferred to imitate or impersonate root.
The preferred method is to utilize sudo
before your commands to run them with root priviliges as needed. Avoid becoming root whenever possible instead do something like:
If you're attempting to utilize sudo
but are running into an error that says something along the lines of :user is not in the sudoers file this incident will be reported
then this indicates that your user is not in the proper group to have sudo permissions. Please note that you may alter the sudoers file utilizing visudo to add your user but that is not advised.
Instead you'll need to become root by typing su -
and entering root's password - not your user's password.
Once you have successfully authenticated and become root you'll need to add your user to the proper group: