linux中,单用户最突出且实用的一个好处就是:可以无密码登录,所以,在忘记密码时,可以进入单用户模式修改登录密码。那么如何进入linux的单用户模式:
1, when the system starts, press the "E" key on the keyboard until you enter the following page:
2, select the item that starts with kernel/vmliuz-***** (i.e. the second item), press the keyboard "E" key, enter the editing interface.
3, at the end of line input: space single, such as. Then enter OK and it will automatically return to the second step of the interface.
4. Press "B" on the keyboard to reboot the system
5, then you enter the "single-user mode", you can use the root function of things, change the file you want to change after reboot restart. (The most common is to reset the root password, then you just enter passwd, and then follow the prompts to enter the new password 2 times, then reboot restart can be)
Ps:
1.linux divided into several modes, see: https://zhidao.baidu.com/question/276464473.html
2. Uncle Bird Tutorial 5.6.2 also talked about forgetting the root password to enter the GRUB boot loader to reset. The method is to add a single after the return press B again to boot into one-user mode.
3. Detailed instruction into single user mode reset Linux root password can refer to Baidu experience, see: https://jingyan.baidu.com/article/6181c3e080d479152ef153ac.html
Linux single-user mode and reset Linux root password