Widely Vision

  • Real History of Israel

  • Poll

  • Get a PDF version

  • Follow This Blog

  • September 2009
    S M T W T F S
    « Aug   Oct »

“INIT” parent of your processes

Posted by aboelnour on September 27, 2009


Peace be upon you:
Today we will talk about a process called Init .

Init  is  the  parent of all processes on the system, it is executed by
the kernel and is responsible for starting all other processes. it is the  parent  of all processes whose natural parents have died and it is responsible for reaping those when they die.

this process lunched by the kernel when the boot operation end and here is the steps:

1.  BIOS: The Basic Input/Output System is the lowest level interface between the computer and peripherals.
The BIOS performs integrity checks on memory and seeks instructions on the Master Boot Record (MBR) on the floppy drive or hard drive.

2. The MBR points to the boot loader (GRUB or LILO: Linux boot loader).

3. Boot loader (GRUB or LILO) will then ask for the OS label which will identify which kernel to run and where it is located (hard drive and partition specified). The installation process requires to creation/identification of partitions and where to install the OS. GRUB/LILO are also configured during this process. The boot loader then loads the Linux operating system.

4. The first thing the kernel does is to execute init program. Init is the root/parent of all processes executing on Linux.
5. Based on the appropriate run-level, scripts are executed to start various processes to run the system and make it functional.

After the kernel is booted and initialized, the kernel starts the first user-space application. This is the first program invoked that is compiled with the standard C library.

The init process is the last step in the boot procedure and identified by process id “1”. Init is responsible for starting system processes as defined in the /etc/inittab file. Upon shutdown, init controls the sequence and processes for shutdown. The init process is never shut down. It is a user process and not a kernel system process although it does run as root.

NOTE: In some modern distro’s there isn’t a /etc/inittab file like Ubuntu they used Upstart.
and there is /etc/event.d which configure init.

Linux init Run Levels:
there is a run levels that you can run your system on it.every runlevel has it’s Specifications:
runlevel 0 : System halt-> be safely powered down.
runlevel 1 : Single user-> login as root user.
runlevel 2 : Multiple users, no network.
runlevel 3 : Multiple users, command line -> the standard runlevel for most Linux-based server hardware.
runlevel 4 : User-definable
runlevel 5 : Multiple users, GUI -> the standard runlevel for most Linux-based desktop systems.
runlevel 6 : Reboot; used when restarting the system.

Every distro may has it’s own runlevel but it stay 7 runlevels from 0 to 6 for more detail you canCheck this .

By default Linux boots either to runlevel 3 or to runlevel 5. to know which runlevel you are in type:


you can run your system on any runlevel by typping


when # is the number of the runlevel you want.

Init in the / directory:
/etc/init.d: this directory contains every script that Init use it.

/etc/rc#.d : this directories contain the scripts which will be runed when you run your system in a specify runlevel

you can see the contents of this directories is a links which links to scripts in/etc/init.d.

/etc/rc#.d/README: this file contains an info about the parent directory.

/etc/init.d/README: this file contains an info about The Init process and the Scripts which located in /etc/init.d.


so it was a simple view over the Init process and how it works.

any feedback is welcomed.

Best wishes,



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: