First we enter the boot interface, press e to select
Then find the line marked with the red line in the picture, at the end of the line Add init=/bin/sh
Hold down Ctrl x and execute to enter single-user mode
As shown in the figure As shown, we can also change the password. The root password is changed by default, and the passwords of other users can also be changed passwd junjind
Execute exec /sbin/init to exit single-user mode.
Recommended related tutorials: centos tutorial
The above is the detailed content of How to enter single user mode in centos7. For more information, please follow other related articles on the PHP Chinese website!