runlevel diagram
The init command switches the run level and
enters the following figure
to switch 3-5 successfully
1), modify the root password. Single-user mode does not require a password to log in.
The steps are as follows: After starting the virtual machine, press the enter key within 3s to enter the following interface; then press [e] to enter the startup file interface, and then
press [↓] to pull to the bottom; add “LANG=zh_cn.UTF-8” after the peer "init=/bin/sh"; then press [Ctrl+X] to enter "single user mode",
enter [ls], and press Enter; then enter [mount -o remount ,rw / ], press Enter (note the space, refer to the picture ); modify the password input, passwd root; after entering the password twice,
enter [touch /.autorelabel] and press Enter; then enter [exec /sbin/init] and press Enter; restart the system
and finally everyone can verify it again. I hope everyone has to help
Linux runlevels and retrieve root password
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324778547&siteId=291194637
Ranking