Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Init
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== {{Anchor|SYSV}}SysV-style == [[File:Sysv-rc-conf.png|thumb|{{Mono|sysv-rc-conf}}, a [[Text-based user interface|TUI]] utility that selects which SysV-style init scripts will be run in each runlevel]] When compared to its predecessors, AT&T's [[UNIX System III]] introduced a new style of system startup configuration,<ref>{{cite web|url=http://minnie.tuhs.org/cgi-bin/utree.pl?file=SysIII%2Fusr%2Fsrc%2Fman%2Fman8%2Finit.8|title=init(8)|work=minnie.tuhs.org|access-date=2015-09-12|archive-date=2021-07-27|archive-url=https://web.archive.org/web/20210727193510/https://minnie.tuhs.org/cgi-bin/utree.pl?file=SysIII%2Fusr%2Fsrc%2Fman%2Fman8%2Finit.8|url-status=live}}</ref> which survived (with modifications) into [[UNIX System V]] and is therefore called the "SysV-style init". At any moment, a running System V is in one of the predetermined number of states, called ''[[runlevel]]s''. At least one runlevel is the normal operating state of the system; typically, other runlevels represent single-user mode (used for repairing a faulty system), system shutdown, and various other states. Switching from one runlevel to another causes a per-runlevel set of scripts to be run, which typically mount filesystems, start or stop [[daemon (Unix)|daemons]], start or stop the [[X Window System]], shutdown the machine, etc. === Runlevels === {{Details|Runlevel}} The [[runlevel]]s in System V describe certain states of a machine, characterized by the processes and daemons running in each of them. In general, there are seven runlevels, out of which three runlevels are considered "standard", as they are essential to the operation of a system: {{ordered list |item1_value=0 | [[Shutdown (computing)|Turn off]] |item2_value=1 | [[Single-user mode]] (also known as ''S'' or ''s'') |item3_value=6 | [[Reboot (computing)|Reboot]] }} Aside from these standard ones, Unix and Unix-like systems treat runlevels somewhat differently. The common denominator, the <code>/etc/inittab</code> file, defines what each configured runlevel does in a given system. === Default runlevels === {| class="wikitable floatright sortable" style="margin-left: 1.5em;" |- ! Operating system ! Default runlevel |- | [[AIX operating system|AIX]] | 5 |- | [[antiX]] | 2 |- | [[Gentoo Linux]] | 3<ref>{{cite web |url=https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscripts |title=Initscripts |work=Gentoo Linux Documentation |publisher=Gentoo.org |date=2014-12-13 |access-date=2020-12-08 |archive-date=2020-12-03 |archive-url=https://web.archive.org/web/20201203013811/https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscripts |url-status=live }}</ref> |- | [[HP-UX]] | 3 (console/server/multiuser) or 4 (graphical) |- | [[Linux From Scratch]] | 3 |- |- | [[Slackware Linux]] | 3 |- | [[Solaris (operating system)|Solaris]] / [[illumos]] | 3<ref>{{cite web |url=https://docs.oracle.com/cd/E23824_01/html/821-1451/hbrunlevels-13026.html |title=Run Levels |publisher=[[Oracle Corporation|Oracle]] |work=Oracle Solaris Administration: Common Tasks |access-date=2017-11-14 |archive-date=2016-04-10 |archive-url=https://web.archive.org/web/20160410084238/http://docs.oracle.com/cd/E23824_01/html/821-1451/hbrunlevels-13026.html |url-status=live }}</ref> |- | [[UNIX System V]] Releases 3.x, 4.x | 2 |- | [[UnixWare]] 7.x | 3 |} On Linux distributions defaulting to runlevel 10 in the table on the right, runlevel 10 invokes a multiuser graphical environment running the [[X Window System]], usually with a [[X display manager (program type)|display manager]] like [[GNOME Display Manager|GDM]] or [[KDE Display Manager|KDM]]. However, the [[Solaris (operating system)|Solaris]] and [[illumos]] operating systems typically reserve runlevel 10 to shut down and automatically power off the machine. On most systems, all users can check the current runlevel with either the <code>runlevel</code> or <code>[[who (Unix)|who]] -r</code> command.<ref>{{cite web |url=http://unixhelp.ed.ac.uk/CGI/man-cgi?runlevel+8 |title=UNIX man pages : runlevel (8) |publisher=Unixhelp.ed.ac.uk |date=1997-05-27 |access-date=2014-07-12 |archive-url=https://web.archive.org/web/20140714112953/http://unixhelp.ed.ac.uk/CGI/man-cgi?runlevel+8 |archive-date=2014-07-14 |url-status=dead }}</ref> The [[superuser|root]] user typically changes the current runlevel by running the <code>telinit</code> or <code>init</code> commands. The <code>/etc/inittab</code> file sets the default runlevel with the <code>:initdefault:</code> entry. On Unix systems, changing the runlevel is achieved by starting only the missing services (as each level defines only those that are started / stopped).{{Citation needed|date=May 2013}} For example, changing a system from runlevel 3 to 4 might only start the local X server. Going back to runlevel 3, it would be stopped again.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)