Linux CentOS 7[edit]
Reboot the Linux CentOS 7 system, then use the arrow keys to select the corresponding system in the screenshot below and press the “e” key.
The following screen appears; press the down arrow key to move the blue-highlighted box, and pay attention to the last part inside that box.
Press “ctrl+e” to move to the end, delete “rhgb quiet LANG=zh_CN.UTF-8”, type “init=/bin/sh”, and press “ctrl+x” to boot the system.
Type “mount -o remount, rw /“ and press Enter to make the filesystem writable.
Type “passwd” to change the password (you have to enter it twice). On success you’ll see the following prompt: all authentication tokens updated successfully.
Type “touch /.autorelabel” to make sure the system recovers correctly after the reboot.
Type “exec /sbin/init” to reinitialize.
The system starts initializing, and once it’s done it reboots automatically — just log in with the new password.
Reposted from http://www.ytyzx.net/index.php/%E5%A6%82%E4%BD%95%E6%81%A2%E5%A4%8D%E6%88%96%E9%87%8D%E7%BD%AEFreeBSD_%26_Linux%E7%9A%84root%E5%AF%86%E7%A0%81








