How to enter linux single-user mode maintenance

  

Linux single-user mode is a system recovery mode that a system administrator must master. For example, the system boot file error, forget the administrator root password, and the document repair is a necessary repair mode. For different boot mode lilo or Grub, the method of entering single-user mode is similar.

1. If you are using lilo to boot the booter, the following commands can be used:

When boot:: When booting, type:

:linux -s

or

:linux 1

or

:linux single

If there is no information about this kernel, the kernel name is not called Linux, at this time, the Linux TAB key is of great use, it can fill in the kernel name (such as linux-new), and finally repeat the above steps.

2. If you are using GRUB:

Press e key when booting the main menu to change the kernel boot setting parameters,

Select the kernel command, press e Modify, at the end of the line, empty one space, add single (or directly add 1 to OK), press enter to save. As shown below: kernel /vmlinuz-2.4.20-8 ro root=LABEL=/single

After the above modification, press b to boot, you can enter single user mode smoothly.

After sh-2.05b# appears, you can use root to maintain the host. After the work is completed, you can exit the normal boot mode.

Copyright © Windows knowledge All Rights Reserved