First open the /etc/sudoers file, find the following line, and add a line under root, as shown below:
## Allow root to run any commands anywhere root ALL=(ALL) ALL tommy ALL=(ALL) ALL
(Online learning video recommendation: linux video tutorial)
After the modification is completed, you can now log in with the tommy account.
Then use the command su to obtain root permissions to operate.
Related tutorial recommendations: linux tutorial
The above is the detailed content of How to add root permissions to users in linux. For more information, please follow other related articles on the PHP Chinese website!