When the default installation is complete and you do not know the root user's password, how do I apply root permissions?
(1) sudo command
[Email protected]:~$ sudo
This allows you to enter the current administrator user password to get superuser privileges. However, by default, 5 minutes of root access is disabled.
(2) Sudo-i
[Email protected]:~$ sudo-i
This way, you can enter the password of the current administrator user to go to the root user.
(3) If you want to use root permissions all the time, switch to the root user through Su.
Let's first reset the root user's password:
[Email protected]:~$ sudo passwd root
This allows you to set the root user's password.
(4) Then you can switch to the root user freely.
[Email protected]:~$ su
Enter the root user's password.
Su "King" or exit back to user rights
How to switch to root user under Linux