For the sake of security, linux imposes a lot of restrictions on common user permissions, but we still need super user permissions, which is similar to administrator permissions in windows. This article briefly introduces how to obtain super user permissions in centos. Each linux release is similar to one. log on directly as a root user. on the logon page, select & ldquo; other & rdquo; and enter the root user name and password to log on directly. 2. normal users enter the superuser status
For the sake of security, linux imposes a lot of restrictions on common user permissions, but we still need super user permissions, which is similar to administrator permissions in windows. This article briefly introduces how to obtain super user permissions in centos.
1. log on directly as the root user
On the login page, select "other" and enter the user name root and password to log on directly.
2. normal users enter the superuser status
Enter su-on the terminal, and then enter the password,
3. use superuser permissions as common users
Some commands can only be executed by the root user. in this case, you only need to add sudo before the command. However, by default, centos does not grant sudo permissions to common users. You need to edit the/etc/sudoers file to add it. The method is as follows:
Python
1234 |
Su-// enter the root user status chmod a + w/etc/sudoers // modify the file to the writable state gedit/etc/sudoers // open the file root ALL (ALL) after ALL, add the username root ALL = (ALL) ALL // note the space in the middle. |