Switch from common users to root users in CentOS7
Why switch to the root user?
The root user is the highest privilege user in the linux system, and has the power to generate and kill the system. However, the system generally does not allow you to log on to the system as a root user because of the excessive user permissions. However, after a common user logs on to the system, the power of the common user is limited and basic operations cannot be performed, such as installing an application, therefore, you need to switch to the root user to perform operations that have a significant impact on the system.
How to switch?
You can use the following command to switch from a common user to a root user:
1Su
Root
After you press enter, the system prompts you to enter the password (this password is the password of the user you normally use. I am not sure whether all users can switch to the root user identity ). After the verification is passed, the switchover is complete. Next, you can perform major operations as root. Be sure to be careful. Many operations are irreversible. If it breaks down, you have to re-build the system.
PS: Switching the root user is a temporary way to get the root permission. There are other ways to get the root permission. For example, adding an ordinary user's account to the sudoers group is a permanent way. Of course, whether it is appropriate to add common users to sudoers depends on your management objectives. For the method, see here.