Single-user mode is a mode in which a
multiuser computer
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
boots
A boot is a type of footwear.
Boot or Boots may also refer to:
Businesses
* Boot Inn, Chester, Cheshire, England
* Boots (company), a high-street pharmacy chain and manufacturer of pharmaceuticals in the United Kingdom
* The Boot, Cromer Str ...
into a single
superuser
In computing, the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor. In some cases, the actual name of th ...
. It is mainly used for maintenance of multi-user environments such as network servers. Some tasks may require exclusive access to shared resources, for example running
fsck
The system utility fsck (''file system consistency check'') is a tool for checking the consistency of a file system in Unix and Unix-like operating systems, such as Linux, macOS, and FreeBSD. A similar command, CHKDSK, exists in Microsoft Wind ...
on a
network share
In computing, a shared resource, or network share, is a computer resource made available from one host to other hosts on a computer network.
It is a device or piece of information on a computer that can be remotely accessed from another compu ...
. This mode can also be used for security purposes network services are not run, eliminating the possibility of outside interference. On some systems a lost
superuser
In computing, the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor. In some cases, the actual name of th ...
password can be changed by switching to single-user mode, but not asking for the password in such circumstances is viewed as a security vulnerability.
Unix family
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating systems provide single-user mode functionality either through the System V-style
runlevel
A runlevel is a mode of operation in the computer operating systems that implements Unix System V-style initialization. Conventionally, seven runlevels exist, numbered from zero to six. ''S'' is sometimes used as a synonym for one of the levels. ...
s, BSD-style boot-loader options, or other boot-time options.
The run-level is usually changed using the
init
command, runlevel 1 or S will boot into single-user mode.
Boot-loader options can be changed during startup before the execution of the kernel.
In
FreeBSD
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
and
DragonFly BSD
DragonFly BSD is a free and open-source Unix-like operating system forked from FreeBSD 4.8. Matthew Dillon, an Amiga developer in the late 1980s and early 1990s and FreeBSD developer between 1994 and 2003, began working on DragonFly BSD in ...
it can be changed before rebooting the system with the command
nextboot -o "-s" -k kernel
, and its bootloader offers the option on bootup to start in single-user mode. In
Solaris the command
reboot -- -s
will cause a reboot into single-user mode.
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
users can accomplish this by holding down after powering the system. The user may be required to enter a password set in the
firmware
In computing, firmware is a specific class of computer software that provides the low-level control for a device's specific hardware. Firmware, such as the BIOS of a personal computer, may contain basic functions of a device, and may provide ...
. In
OS X El Capitan
OS X El Capitan ( ) () is the twelfth major release of macOS (named OS X at the time of El Capitan's release), Apple Inc.'s desktop and server operating system for Macintosh. It focuses mainly on performance, stability, and security. Followi ...
and later releases of macOS, the mode can be reversed to single-user mode with the command
sudo launchctl reboot userspace -s
in Terminal, and the system can be fully rebooted in single-user mode with the command
sudo launchctl reboot system -s
. Single-user mode is different from a
safe mode boot in that the system goes directly to the console instead of starting up the core elements of macOS (items in
/System/Library/
, ignoring
/Library/
,
~/Library/
, et al.). From there users are encouraged by a prompt to run
fsck
The system utility fsck (''file system consistency check'') is a tool for checking the consistency of a file system in Unix and Unix-like operating systems, such as Linux, macOS, and FreeBSD. A similar command, CHKDSK, exists in Microsoft Wind ...
or other
command line
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
utilities as needed (or installed).
Microsoft Windows
Microsoft Windows provides
Recovery Console
The Recovery Console is a feature of the Windows 2000, Windows XP and Windows Server 2003 operating systems. It provides the means for administrators to perform a limited range of tasks using a command-line interface.
Its primary function is to ...
, Last Known Good Configuration,
Safe Mode and recently
Windows Recovery Environment
Windows Preinstallation Environment (also known as Windows PE and WinPE) is a lightweight version of Windows used for the deployment of PCs, workstations, and servers, or troubleshooting an operating system while it is offline. It is intended t ...
as standard recovery means.
Also, bootable
BartPE
BartPE (Bart's Preinstalled Environment) is a discontinued tool that customizes Windows XP or Windows Server 2003 into a lightweight environment, similar to Windows Preinstallation Environment, which could be run from a Live CD or Live USB drive. ...
-based third-party recovery discs are available.
Recovery Console and recovery discs are different from single-user modes in other operating systems because they are independent of the maintained operating system. This works more like
chrooting into other environment with other kernel in Linux.
References
*
UNIX Research System Programmer's Manual
Operating system technology
Booting
{{Comp-sci-stub