This wide- and large- screen layout
may not work quite right without Javascript.
Maybe enable Javascript, then try again.
"Single user mode" can be useful for self-maintenance of Unix-derived systems (e.g. Linux), when very occasionally the automatic maintenance procedures don't do their job. But it's often rather murky exactly what "single user mode" really means, how to invoke or enter it (is a boot required?), and what specifically to use it for. Redhat/Fedora/CentOS distributions of Linux have attempted to clarify the situation, partly by introducing some new terminology.
The original Unix booted up in stages
...and could return back down to any of these stages.
The stages were called "runlevels"
(sometimes colloquially also called "modes").
Bootup went through most of these stages in sequence,
as specified by the instructions
/etc/inittab
and under the directory
/etc/rc.d
.
Stages could be returned to with the init
command.
Originally there were eight stages, named
s(ingle), 0, 1, 2, 3, 4, 5, and 6.
Runlevels 0 and 6 merely specified transitional states;
Runlevel 0 was on the way to a system "halt",
and Runlevel 6 was on the way to a system "restart";
these two runlevels were not used for normal operation,
nor were they part of the bootup sequence.
Almost as soon as the original Unix was distributed,
users began expressing unhappiness with the single runlevel,
typically desiring it to be password-protected.
Unix responded by subdividing the single runlevel into two.
One subflavor of single was available only at bootup
and required entry of the root password
in order to enter commands at the console.
The other subflavor of single
was available via the init
command
and pretty much matched the original single runlevel.
Sometimes some attempt was made to distinguish
the two subflavors by letter case (s vs. S).
Calling the two sub-runlevels by the same name (single) was of course confusing. But since only a few administrators were ever expected to use either sub-runlevel, the confusing terminology didn't seem like a big deal.
Modern Unix-derived systems, such as the various distributions of Linux, typically have only a few meaningful runlevels, for example
So modern Unix-derived systems typically use only some of the runlevels and ignore the rest. Runlevel 0 is still used to specify a "halt" and runlevel 6 is still used to specify a "restart".
Modern Unix-derived systems brought even wider divergence to the two sub-runlevels of single (not only password required or not, but also root partition mounted read-only or read-write, and other disk partitions mounted or not). In many cases the confusion continued (or even worsened).
Redhat-Fedora-CentOS has attempted to clarify the situation
by elevating the sub-runlevels to full runlevels
and giving them different names. In these
systems, the runlevels are now Emergency,
S(ingle), 0, 1, 2, 3, 4, 5, and 6.
From the point of view of the init
command,
the runlevels are S(ingle), 0, 1, 2, 3, 4, 5, and 6 as always.
The emergency runlevel is avalable only at bootup.
The init
command knows nothing about it,
and there's no way to return to it.
In Redhat-Fedora-CentOS systems, the single runlevel
is not password-protected,
and has all disk partitions mounted read-write.
The emergency runlevel,
used for some very low-level maintenance operations
such as correcting disk errors,
is password-protected,
and has only the root disk partition mounted
(and even that only read-only).
(Unlike many Unix-derived systems,
for repairing a disk either emergency
mode or a separate boot system is needed;
what's called single mode
will not work for repairing a disk
on a Redhat/Fedora/CentOS system.)
Both modes rejoin the normal boot sequence
when the user logs out (^D), rather than by using
either the init
or the mount
commands
or physically rebooting.
While neither single nor emergency
runlevels are used in routine operation,
or even for routine recovery from an abrupt shutdown (such as a power outage),
they may be helpful for performing some maintenance procedures.
Often an easy way to perform such maintenance procedures
is to boot a completely different OS,
then access the system that needs maintenance
from the alternate OS.
This booting of a different OS is typically done with a LiveCD
.
However sometimes it's easier
to just use the same OS to perform maintenance on itself.
Self-maintenance is the purpose of
single and emergency runlevels.
The emergency runlevel is particularly useful, as it allows disk partitions that remain problematic -even after the the automatic mechanisms have tried to handle the issue- to be repaired or replaced without booting a separate OS. The single runlevel may be less useful for modern Unix-derived systems, especially those which have only one terminal for only one user anyway, and particularly since system daemons (continuously running background processes) can be stopped and started individually anyway.
ESC
keye
keydown arrow
key
(so the cursor is on the middle line
that says kernel)e
key againblank
(spacebar, to separate new parameter from old)Enter
keyb
key^D
key to logout
mount -o remount ...
as you would in some other Unix-derived systems)
The single runlevel is also accessible
from a running system without rebooting,
by using the init s
command.
The intention is the single runlevel
will behave exactly the same
whether it's entered from bootup or from the init
command;
however there's always some possiblity this won't actually be the case.
ESC
keye
keydown arrow
key
(so the cursor is on the middle line
that says kernel)e
key againblank
(spacebar, to separate new parameter from old)Enter
keyb
keyEnter
keyfsck
of some disk partitions^D
key to logout
mount -o remount ...
as you would in some other Unix-derived systems)