Knowledge (XXG)

init

Source ๐Ÿ“

162: 140: 43: 373: 404:. 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 643:
On Unix systems, changing the runlevel is achieved by starting only the missing services (as each level defines only those that are started / stopped). 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.
430:
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:
313:
file determines what programs are run by init. The advantage of this system is that it is simple and easy to edit manually. However, new software added to the system may require changes to existing files that risk producing an unbootable system.
359:
directory. Unlike System V's script ordering, which is derived from the filename of each script, this system uses explicit dependency tags placed within each script. The order in which scripts are executed is determined by the
1667: 1406: 652:
Traditionally, one of the major drawbacks of init is that it starts tasks serially, waiting for each to finish loading before moving on to the next. When startup processes end up
1433: 1523: 1086: 814:, a software suite, full replacement for init in Linux that includes an init daemon, with concurrent starting of services, service manager, and other features. 656:(I/O) blocked, this can result in long delays during boot. Speeding up I/O, e.g. by using SSDs, may shorten the delays but it does not address the root cause. 1325: 262:
Since then, several additional init implementations have been created, attempting to address design limitations in the traditional versions. These include
1148: 1516: 749:, a process spawner that utilizes system-provided init, while providing process isolation, parallelized startup, and service dependency; used by 1394: 1479: 892: 582:
On Linux distributions defaulting to runlevel 5 in the table on the right, runlevel 5 invokes a multiuser graphical environment running the
1532: 1509: 859: 1427: 1115: 1056: 126: 64: 57: 587: 1492: 1349: 1169: 659:
Various efforts have been made to replace the traditional init daemons to address this and other design problems, including:
462:
Aside from these standard ones, Unix and Unix-like systems treat runlevels somewhat differently. The common denominator, the
317: 244: 1078: 799: 1615: 1304: 777: 267: 1279: 1329: 785: 599: 545: 193: 107: 53: 864: 831: 724: 676: 380: 213: 79: 1204: 1468: 251:
employed a traditional init that was somewhat compatible with System V, while some distributions such as
1373: 1229: 1136: 224:
will occur if the kernel is unable to start it, or it should die for any reason. Init is typically assigned
86: 708: 983: 960: 591: 31: 93: 606:
operating systems typically reserve runlevel 5 to shut down and automatically power off the machine.
485: 436: 1254: 798:
service and daemon manager which provides asynchronous, dependency-based initialisation; written in
770:, a cross-platform full replacement for init with parallel starting of services, used by default in 161: 1627: 884: 805: 788:
starting with Solaris 10, but launched as the only service by the original System V-style init
595: 1590: 1144: 827: 525: 455: 391:
introduced a new style of system startup configuration, which survived (with modifications) into
248: 225: 201: 75: 139: 1029: 1006: 441: 325: 181: 1107: 1052: 834:
and used by them until 2014. It was also used in Fedora 9, Red Hat Enterprise Linux 6 and
204:
process that continues running until the system is shut down. It is the direct or indirect
1501: 1496: 1483: 791: 688: 583: 535: 409: 398:
At any moment, a running System V is in one of the predetermined number of states, called
388: 329: 252: 232: 943: 920: 740: 209: 205: 143: 830:, a full replacement of init designed to start processes asynchronously. Initiated by 1661: 1605: 1489: 817: 559: 405: 392: 290: 240: 236: 1343: 754: 750: 743:(it launches SystemStarter to run old-style 'rc.local' and SystemStarter processes) 680: 653: 505: 302: 294: 256: 221: 169: 1173: 711:, a single-threaded Linux init system focused on simplicity and service management 100: 239:, the design of init has diverged from the functionality provided by the init in 1636: 762: 692: 42: 1300: 383:
utility that selects which SysV-style init scripts will be run in each runlevel
771: 615: 1536: 667: 663: 621: 609:
On most systems, all users can check the current runlevel with either the
372: 1275: 1039: 1016: 993: 970: 947: 924: 839: 821: 570: 427: 421: 400: 17: 1600: 1585: 1454: 1402: 937: 914: 847: 811: 781: 720: 717:, a full replacement of init designed to start processes asynchronously 700: 696: 672: 603: 549: 352: 271: 263: 217: 197: 1561: 1556: 1199: 1194: 1035: 1012: 989: 966: 835: 802:
and meant to be interactively hackable during normal system operation
780:(SMF), a complete replacement/redesign of init from the ground up in 758: 746: 714: 684: 348: 321: 279: 466:
file, defines what each configured runlevel does in a given system.
1369: 344:
file that is run in a sub-shell near the end of the boot sequence.
1646: 1641: 1566: 1473: 767: 728: 515: 495: 371: 275: 160: 138: 1225: 736: 320:
init was, prior to 4.3BSD, the same as Research UNIX's init; in
177: 1505: 1195:"GitHub - davmac314/dinit: Service monitoring / "init" system" 795: 732: 36: 30:
This article is about the Unix process. For other uses, see
624:
user typically changes the current runlevel by running the
1250: 364:
utility based on the requirements stated in these tags.
355:
5.0 and successors. This system executes scripts in the
885:"Lennart Poettering on systemd's Tumultuous Ascendancy" 1480:
Solaris Service Management Facility - Quickstart Guide
820:, a process spawner started by the BSD-style init in 208:
of all other processes and automatically adopts all
1626: 1575: 1544: 1429:
Software Architecture: Chromium OS design documents
757:and its derivatives, and available as an option in 340:, BSD variants have long supported a site-specific 1668:Unix process- and task-management-related software 1490:A history of modern init systems (1992–2015) 255:use BSD-style startup scripts, and others such as 808:, a software suite that includes an init system. 1172:. Unixhelp.ed.ac.uk. 1997-05-27. Archived from 395:and is therefore called the "SysV-style init". 520:3 (console/server/multiuser) or 4 (graphical) 387:When compared to its predecessors, AT&T's 1517: 8: 332:on graphical terminals under the control of 247:derivatives. Up until the early 2010s, most 1399:Red Hat Enterprise Linux 6: Technical Notes 1141:Oracle Solaris Administration: Common Tasks 846:As of February 2019, systemd has been 347:A fully modular system was introduced with 1524: 1510: 1502: 473: 705:Dinit, a service manager and init system. 127:Learn how and when to remove this message 1053:"Unix and Linux startup scripts, Part 2" 636:file sets the default runlevel with the 876: 63:Please improve this article by adding 1474:A paper summarizing Unix init schemes 1059:from the original on 18 December 2009 7: 1170:"UNIX man pages : runlevel (8)" 1051:Andrew Smallshaw (7 December 2009). 336:. To remove the requirement to edit 259:have their own customized versions. 1301:"s6: why another supervision suite" 860:Operating system service management 850:by most major Linux distributions. 200:of the operating system. Init is a 305:on terminals under the control of 25: 1486: (archived December 31, 2005) 1436:from the original on 9 April 2022 1372:. Linux Weekly News. 2010-09-14. 1278:. Free Software Foundation, Inc. 824:prior to Mac OS X v10.4 324:, it added support for running a 41: 1409:from the original on 2018-08-29 1376:from the original on 2010-09-19 1352:from the original on 2022-03-27 1307:from the original on 2021-09-13 1282:from the original on 2016-02-12 1257:from the original on 2020-08-29 1232:from the original on 2014-08-02 1207:from the original on 2021-12-12 1151:from the original on 2016-04-10 1118:from the original on 2020-12-03 1089:from the original on 2021-07-27 895:from the original on 2018-11-08 165:Version 7 Unix: contents of an 1370:"Fedora defers systemd to F15" 309:. There are no runlevels; the 1: 867:โ€” an equivalent in Windows NT 412:, shutdown the machine, etc. 293:init runs the initialization 286:Research Unix-style/BSD-style 65:secondary or tertiary sources 1276:"The Shepherd - GNU Project" 1226:"Epoch Init System Homepage" 723:, a replacement for init in 699:before it was replaced with 1616:Service Management Facility 1345:Fedora 14 Accepted Features 778:Service Management Facility 268:Service Management Facility 1684: 1114:. Gentoo.org. 2014-12-13. 1112:Gentoo Linux Documentation 677:embedded operating systems 419: 29: 1576:Operating-system-specific 865:Session Manager Subsystem 212:. Init is started by the 1545:Portable implementations 741:Mac OS X v10.4 231:In Unix systems such as 454: 440: 435: 1251:"Void Linux main page" 384: 173: 158: 52:relies excessively on 1469:FreeBSD init man page 648:Other implementations 420:Further information: 375: 164: 142: 32:INIT (disambiguation) 27:UNIX system component 408:, start or stop the 1628:Process supervision 249:Linux distributions 1533:Service management 1495:2015-10-11 at the 822:Mac OS X 562:Releases 3.x, 4.x 526:Linux From Scratch 385: 351:1.5 and ported to 226:process identifier 210:orphaned processes 174: 159: 1655: 1654: 1015:System Manager's 969:System Manager's 586:, usually with a 580: 579: 480:Default runlevel 477:Operating system 470:Default runlevels 182:operating systems 150:listing, showing 137: 136: 129: 111: 16:(Redirected from 1675: 1526: 1519: 1512: 1503: 1457: 1455:Systemd#Adoption 1451: 1445: 1444: 1443: 1441: 1424: 1418: 1417: 1415: 1414: 1391: 1385: 1384: 1382: 1381: 1366: 1360: 1359: 1358: 1357: 1340: 1334: 1333: 1328:. Archived from 1326:"s6 init system" 1322: 1316: 1315: 1313: 1312: 1297: 1291: 1290: 1288: 1287: 1272: 1266: 1265: 1263: 1262: 1247: 1241: 1240: 1238: 1237: 1222: 1216: 1215: 1213: 1212: 1191: 1185: 1184: 1182: 1181: 1166: 1160: 1159: 1157: 1156: 1133: 1127: 1126: 1124: 1123: 1104: 1098: 1097: 1095: 1094: 1075: 1069: 1068: 1066: 1064: 1048: 1042: 1033: 1032: 1025: 1019: 1010: 1009: 1002: 996: 987: 986: 979: 973: 964: 963: 956: 950: 941: 940: 933: 927: 918: 917: 910: 904: 903: 901: 900: 881: 639: 635: 631: 627: 619: 612: 474: 465: 442:Single-user mode 378: 358: 343: 339: 335: 326:windowing system 312: 308: 301:, then launches 300: 180:-based computer 168: 157: 153: 149: 132: 125: 121: 118: 112: 110: 69: 45: 37: 21: 1683: 1682: 1678: 1677: 1676: 1674: 1673: 1672: 1658: 1657: 1656: 1651: 1622: 1571: 1540: 1530: 1497:Wayback Machine 1484:Wayback Machine 1465: 1460: 1452: 1448: 1439: 1437: 1426: 1425: 1421: 1412: 1410: 1393: 1392: 1388: 1379: 1377: 1368: 1367: 1363: 1355: 1353: 1342: 1341: 1337: 1324: 1323: 1319: 1310: 1308: 1299: 1298: 1294: 1285: 1283: 1274: 1273: 1269: 1260: 1258: 1249: 1248: 1244: 1235: 1233: 1224: 1223: 1219: 1210: 1208: 1193: 1192: 1188: 1179: 1177: 1168: 1167: 1163: 1154: 1152: 1135: 1134: 1130: 1121: 1119: 1106: 1105: 1101: 1092: 1090: 1083:minnie.tuhs.org 1077: 1076: 1072: 1062: 1060: 1050: 1049: 1045: 1028: 1027: 1026: 1022: 1005: 1004: 1003: 999: 982: 981: 980: 976: 959: 958: 957: 953: 936: 935: 934: 930: 913: 912: 911: 907: 898: 896: 883: 882: 878: 874: 856: 689:Tiny Core Linux 650: 637: 633: 629: 625: 614: 610: 598:. However, the 588:display manager 584:X Window System 536:Slackware Linux 472: 463: 460: 444:(also known as 424: 418: 410:X Window System 389:UNIX System III 376: 370: 356: 341: 337: 333: 310: 306: 298: 288: 196:started during 192:) is the first 166: 155: 151: 147: 133: 122: 116: 113: 70: 68: 62: 58:primary sources 46: 35: 28: 23: 22: 15: 12: 11: 5: 1681: 1679: 1671: 1670: 1660: 1659: 1653: 1652: 1650: 1649: 1644: 1639: 1633: 1631: 1624: 1623: 1621: 1620: 1619: 1618: 1610: 1609: 1608: 1603: 1595: 1594: 1593: 1588: 1579: 1577: 1573: 1572: 1570: 1569: 1564: 1559: 1554: 1548: 1546: 1542: 1541: 1531: 1529: 1528: 1521: 1514: 1506: 1500: 1499: 1487: 1477: 1471: 1464: 1463:External links 1461: 1459: 1458: 1446: 1419: 1386: 1361: 1348:, 2010-07-13, 1335: 1332:on 2021-09-13. 1317: 1292: 1267: 1242: 1217: 1186: 1161: 1128: 1099: 1070: 1043: 1020: 997: 974: 951: 944:Version 7 Unix 928: 921:Version 7 Unix 905: 891:. 2018-11-08. 875: 873: 870: 869: 868: 862: 855: 852: 844: 843: 825: 815: 809: 803: 789: 774: 765: 744: 739:starting with 718: 712: 706: 703: 695:, and used by 670: 649: 646: 632:commands. The 578: 577: 574: 567: 566: 563: 556: 555: 552: 542: 541: 538: 532: 531: 528: 522: 521: 518: 512: 511: 508: 502: 501: 498: 492: 491: 488: 482: 481: 478: 471: 468: 459: 458: 453: 439: 433: 417: 414: 369: 366: 287: 284: 190:initialization 144:Version 7 Unix 135: 134: 49: 47: 40: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 1680: 1669: 1666: 1665: 1663: 1648: 1645: 1643: 1640: 1638: 1635: 1634: 1632: 1629: 1625: 1617: 1614: 1613: 1611: 1607: 1606:SystemStarter 1604: 1602: 1599: 1598: 1596: 1592: 1589: 1587: 1584: 1583: 1581: 1580: 1578: 1574: 1568: 1565: 1563: 1560: 1558: 1555: 1553: 1550: 1549: 1547: 1543: 1538: 1534: 1527: 1522: 1520: 1515: 1513: 1508: 1507: 1504: 1498: 1494: 1491: 1488: 1485: 1481: 1478: 1475: 1472: 1470: 1467: 1466: 1462: 1456: 1450: 1447: 1435: 1431: 1430: 1423: 1420: 1408: 1404: 1400: 1396: 1390: 1387: 1375: 1371: 1365: 1362: 1351: 1347: 1346: 1339: 1336: 1331: 1327: 1321: 1318: 1306: 1302: 1296: 1293: 1281: 1277: 1271: 1268: 1256: 1252: 1246: 1243: 1231: 1227: 1221: 1218: 1206: 1202: 1201: 1196: 1190: 1187: 1176:on 2014-07-14 1175: 1171: 1165: 1162: 1150: 1146: 1142: 1138: 1132: 1129: 1117: 1113: 1109: 1108:"Initscripts" 1103: 1100: 1088: 1084: 1080: 1074: 1071: 1058: 1054: 1047: 1044: 1041: 1038:File Formats 1037: 1034: โ€“  1031: 1024: 1021: 1018: 1014: 1011: โ€“  1008: 1001: 998: 995: 992:File Formats 991: 988: โ€“  985: 978: 975: 972: 968: 965: โ€“  962: 955: 952: 949: 946:Programmer's 945: 942: โ€“  939: 932: 929: 926: 923:Programmer's 922: 919: โ€“  916: 909: 906: 894: 890: 889:The New Stack 886: 880: 877: 871: 866: 863: 861: 858: 857: 853: 851: 849: 841: 837: 833: 829: 826: 823: 819: 818:SystemStarter 816: 813: 810: 807: 804: 801: 797: 793: 790: 787: 783: 779: 775: 773: 769: 766: 764: 760: 756: 752: 748: 745: 742: 738: 734: 730: 726: 722: 719: 716: 713: 710: 707: 704: 702: 698: 694: 690: 686: 682: 678: 674: 671: 669: 665: 662: 661: 660: 657: 655: 647: 645: 641: 638::initdefault: 623: 620:command. The 617: 607: 605: 601: 597: 593: 589: 585: 575: 572: 569: 568: 564: 561: 560:UNIX System V 558: 557: 553: 551: 547: 544: 543: 539: 537: 534: 533: 529: 527: 524: 523: 519: 517: 514: 513: 509: 507: 504: 503: 499: 497: 494: 493: 489: 487: 484: 483: 479: 476: 475: 469: 467: 457: 451: 447: 443: 438: 434: 432: 429: 423: 415: 413: 411: 407: 403: 402: 396: 394: 393:UNIX System V 390: 382: 374: 367: 365: 363: 354: 350: 345: 342:/etc/rc.local 331: 327: 323: 319: 315: 304: 296: 292: 291:Research Unix 285: 283: 281: 277: 273: 269: 265: 260: 258: 254: 250: 246: 242: 241:Research Unix 238: 234: 229: 227: 223: 219: 215: 211: 207: 203: 199: 195: 191: 187: 183: 179: 171: 163: 145: 141: 131: 128: 120: 117:December 2020 109: 106: 102: 99: 95: 92: 88: 85: 81: 78: โ€“  77: 73: 72:Find sources: 66: 60: 59: 55: 50:This article 48: 44: 39: 38: 33: 19: 1551: 1449: 1438:, retrieved 1428: 1422: 1411:. Retrieved 1398: 1395:"Deployment" 1389: 1378:. Retrieved 1364: 1354:, retrieved 1344: 1338: 1330:the original 1320: 1309:. Retrieved 1295: 1284:. Retrieved 1270: 1259:. Retrieved 1245: 1234:. Retrieved 1220: 1209:. Retrieved 1198: 1189: 1178:. Retrieved 1174:the original 1164: 1153:. Retrieved 1140: 1137:"Run Levels" 1131: 1120:. Retrieved 1111: 1102: 1091:. Retrieved 1082: 1073: 1061:. Retrieved 1046: 1023: 1000: 977: 954: 931: 908: 897:. Retrieved 888: 879: 845: 800:Guile Scheme 751:Alpine Linux 687:5(Rolling), 681:Alpine Linux 675:, suited to 673:busybox-init 658: 654:Input/output 651: 642: 634:/etc/inittab 608: 581: 506:Gentoo Linux 464:/etc/inittab 461: 449: 445: 425: 399: 397: 386: 377:sysv-rc-conf 361: 346: 316: 295:shell script 289: 261: 230: 222:kernel panic 189: 185: 175: 170:Bourne shell 123: 114: 104: 97: 90: 83: 71: 51: 1637:daemontools 763:Artix Linux 693:VMware ESXi 664:BootScripts 297:located at 220:process; a 216:during the 188:(short for 1440:25 January 1413:2013-12-31 1380:2010-09-17 1356:2010-07-13 1311:2021-09-13 1286:2016-01-16 1261:2020-08-31 1236:2014-07-31 1211:2021-12-12 1180:2014-07-12 1155:2017-11-14 1122:2020-12-08 1093:2015-09-12 899:2024-01-30 872:References 772:Void Linux 679:, used by 368:SysV-style 233:System III 87:newspapers 54:references 1537:Unix-like 1079:"init(8)" 668:GoboLinux 428:runlevels 416:Runlevels 401:runlevels 357:/etc/rc.d 334:/etc/ttys 307:/etc/ttys 253:Slackware 1662:Category 1612:Solaris 1493:Archived 1434:archived 1407:Archived 1374:Archived 1350:archived 1305:Archived 1280:Archived 1255:Archived 1230:Archived 1205:Archived 1149:Archived 1116:Archived 1087:Archived 1057:Archived 893:Archived 854:See also 840:ChromeOS 792:Shepherd 611:runlevel 571:UnixWare 437:Turn off 422:Runlevel 328:such as 243:and its 237:System V 206:ancestor 18:Sysvinit 1601:launchd 1591:Upstart 1586:systemd 1539:systems 1482:at the 1403:Red Hat 1030:ttys(5) 1007:init(8) 984:ttys(5) 961:init(8) 938:ttys(5) 915:init(8) 848:adopted 828:Upstart 812:systemd 786:Solaris 782:illumos 721:launchd 697:OpenWrt 640:entry. 626:telinit 604:illumos 600:Solaris 550:illumos 546:Solaris 406:daemons 362:rcorder 353:FreeBSD 338:/etc/rc 311:/etc/rc 299:/etc/rc 272:systemd 264:launchd 218:booting 198:booting 194:process 167:/etc/rc 101:scholar 1597:macOS 1582:Linux 1562:OpenRC 1557:Initng 1476:(2007) 1200:GitHub 1145:Oracle 1063:6 June 1040:Manual 1036:4.3BSD 1017:Manual 1013:4.3BSD 994:Manual 990:4.2BSD 971:Manual 967:4.2BSD 948:Manual 925:Manual 836:Google 832:Ubuntu 794:, the 759:Devuan 755:Gentoo 747:OpenRC 725:Darwin 715:Initng 691:, and 685:SliTaz 456:Reboot 349:NetBSD 322:4.3BSD 280:OpenRC 266:, the 257:Gentoo 214:kernel 202:daemon 172:script 103:  96:  89:  82:  76:"Init" 74:  1647:runit 1642:monit 1630:tools 1567:runit 768:runit 729:macOS 709:Epoch 701:procd 590:like 516:HP-UX 496:antiX 303:getty 276:Runit 108:JSTOR 94:books 1552:init 1453:See 1442:2014 1065:2011 776:Sun 761:and 737:tvOS 630:init 622:root 602:and 573:7.x 426:The 379:, a 278:and 235:and 186:init 178:Unix 154:and 152:init 148:/etc 80:news 1535:in 838:'s 796:GNU 733:iOS 666:in 628:or 616:who 613:or 596:KDM 594:or 592:GDM 486:AIX 448:or 381:TUI 318:BSD 245:BSD 228:1. 176:In 56:to 1664:: 1432:, 1405:. 1401:. 1397:. 1303:. 1253:. 1228:. 1203:. 1197:. 1147:. 1143:. 1139:. 1110:. 1085:. 1081:. 1055:. 887:. 806:s6 753:, 683:, 618:-r 576:3 565:2 554:3 548:/ 540:3 530:3 510:3 500:5 490:2 282:. 274:, 270:, 184:, 156:rc 146:: 67:. 1525:e 1518:t 1511:v 1416:. 1383:. 1314:. 1289:. 1264:. 1239:. 1214:. 1183:. 1158:. 1125:. 1096:. 1067:. 902:. 842:. 784:/ 735:/ 731:/ 727:/ 452:) 450:s 446:S 330:X 130:) 124:( 119:) 115:( 105:ยท 98:ยท 91:ยท 84:ยท 61:. 34:. 20:)

Index

Sysvinit
INIT (disambiguation)

references
primary sources
secondary or tertiary sources
"Init"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message

Version 7 Unix

Bourne shell
Unix
operating systems
process
booting
daemon
ancestor
orphaned processes
kernel
booting
kernel panic
process identifier
System III
System V

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

โ†‘