Knowledge

init

Source ๐Ÿ“

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

Index

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
Research Unix

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

โ†‘