Single-User Mode

Runlevel 1, the single-user runlevel, is a bare-bones operating environment intended for system maintenance. In single-user mode, remote logins are disabled, networking is disabled, and most daemons are not started. Single-user mode is used for system configuration tasks that must be performed with no user activity. One common reason you might be forced to use single-user mode is to correct problems with a corrupt filesystem that the system cannot handle automatically.

If you wish to boot directly into single-user mode, you may specify it at boot time with the kernel’s command line through your boot loader. For instance, the GRUB boot loader allows you to pass arbitrary parameters to a kernel at boot time. In order to change the default runlevel, edit the line that boots your kernel in the GRUB interactive menu, adding a 1 or the word single to the end of the line to indicate single-user mode. These arguments are not interpreted as kernel arguments but are instead passed along to the init process. For example, if your default GRUB kernel boot line looks like this:

kernel /vmlinuz- ro root=/dev/hda1 rhgb quiet

you can force the system to boot to runlevel 1 by changing this to:

kernel /vmlinuz- ro root=/dev/hda5 rhgb quiet 1


kernel /vmlinuz- ro root=/dev/hda5 rhgb \
                                                    quiet single

To switch into single-user mode from another runlevel, you can simply issue a runlevel change command with ...

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.