Linux Startup Inittab file

Source: Internet
Author: User

From the touch of Linux to the present, the period has been used Redhat,slackware,kali. Different release versions start files slightly differently, but the overall process is the same. Press the Power key to post first, then enter the bootloader boot system. Bootloader are generally either LILO or GRUB,GRUB2. When the system is selected, it is loaded into the kernel file and the Initrd file.

The first process that starts first is init,init reads the/etc/inittab file, which results in other processes.


The Inittab file describes the process that needs to be executed at startup. The format of the entries is as follows:

Id:runlevels:action:process


ID: is a unique identifier used to represent an entry

Runlevels: Run level. 0: Shut down, 1: Single user, 2-5: multiuser; 6: Reboot (take Kali for example, other distributions are slightly different, see the file in detail)

Action: Describes the action that will be performed

Process: Executed processes (commands)

Note: The Runlevels field may contain multiple runlevel. However, if the action field is sysinit,boot,bootwait, the Runlevels area is ignored.


The Action field includes:

1. Respawn: Restarts when the process is ended

2. Wait: The associated process (command) is executed when the specified RunLevel is entered, and the Init process waits for

3. Once: The associated process is executed when the specified RunLevel is entered

4. Boot: will be executed at system startup

5, bootwait: will be executed when the system starts, and the INIT process will wait

6, off: do nothing

7, Initdefault: Specify the relevant operating level after the system starts to enter

8, Sysinit: will be executed when the system starts, it will be executed before boot and bootwait.

9, powerwait: will be executed when power is turned off, and Init will wait

10. Ctrlaltdel: Executes when the three keys are pressed


Init looks for an entry in the/etc/inittab file for the Action field Initdefault, and then executes the corresponding command, but before that, the Action field is sysinit first, because this is done first when the system starts. When you are ready to enter a multi-user level, the Action field is executed first by the boot and bootwait commands.


Note: The man manual says that if you enter a single user from multiple users, it is not safe to go directly to multiple users from a single user, because when you enter a single user, you kill a lot of the runlevel s-initiated processes, the best way is to reboot.

This article from "Lotus's Thoughts" blog, please be sure to keep this source http://liandesinian.blog.51cto.com/7737219/1548933

Linux Startup Inittab file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.