By default, root has not been activated. You need to set a password for root and activate root.
The command is as follows: (Recommended tutorial:centos usage tutorial)
sudo passwd Password:你当前用户的密码 Enter new UNIX password:这个是root的密码 Retype new UNIX password:重复root的密码
After completing the above steps, you can log in directly as root.
Recommended related video tutorials:linux video tutorial
The above is the detailed content of How to activate root user in centos. For more information, please follow other related articles on the PHP Chinese website!