How to obtain root permissions on CentOS 7?
To obtain root access, you need to use the sudo command or switch to the root user.
- To use the sudo command:
Under a regular user account, you can use the sudo command to execute commands that require root permissions. For example, to run a command that requires root permissions, you can input it like this:
sudo command
The system will prompt you to enter the password of the current user. Once you enter the password, you can execute the command that requires root permissions.
- Switch to the root user:
You can also switch to the root user to obtain root privileges. You can use the following command to switch to the root user:
su -
After entering the password for the root user, you can switch to the root user and obtain root privileges.
Please note that obtaining root permissions is a risky operation. It is advisable to only obtain root permissions when necessary to avoid accidental system issues.