Init

In Unix or Linux-based operating systems, init, short for initialization, is the first process during the booting of a computer system that runs until the system is shut down. Init is a daemon process executed by the kernel and is the last step of the kernel boot sequence. Its principal role is to create processes from a script stored in the /etc/inittab file. It also controls independent processes required by any particular system.

In simplest terms, the job of init is to get everything running the way it should be once the kernel is fully running. It essentially establishes and operates the entire user space.

After the /etc/inittab is read, init determines how the system in each runlevel should be set up as well as the set default runlevel. Runlevel is a software configuration that allows only a selected group of processes to exist. These processes are defined in the /etc/inittab file.

Init runlevels

Init can be one of eight runlevels: 0-6, S, or s, although the runlevel can be changed if needed. It’s worth noting S and s are the same and are not meant to be used directly but only for the scripts that are executed when entering runlevel 1.

The functions of runlevels are as follows:

  • 0: Halts the system
  • 1: Gets the system down into single user mode
  • 2: Gets multiuser mode without networking
  • 3: Gets multiuser mode with networking
  • 4: Not used
  • 5: Gets multiuser with networking and X windows
  • 6: Reboots the system

After init is invoked as the last step of the kernel boot sequence, the /etc/inittab file is looked for to see if an entry of the type initdefault is present, which determines the initial runlevel of the system. If it’s not present, a runlevel must be entered at the system console.

By default most Linux-based systems boot to runlevel 3 or 5. After the default runlevel is set, init starts all background processes. Init must start all necessary daemons, background processes, and services required such as starting up a boot screen, various parts of the networking stack, and hardware in the machine.

Macs also used the term init before System 7 to refer to system extensions.





Abby Braden
Abby Braden
Abby Braden is an award-winning writer and editor for websites such as TechnologyAdvice.com, Webopedia.com, and Project-Management.com, where she covers technology trends and enterprise and SMB project management platforms. When she’s not writing about technology, she enjoys giving too many treats to her dog and coaching part-time at her local gym.

Related Articles

Geotargeting

Geotargeting is a method of delivering data or content to users based on their geographic locations. Depending on the application or platform, companies can...

RSA

A public-key encryption technology developed by RSA Data Security, Inc. The acronym stands for Rivest, Shamir, and Adelman, the inventors of the technique. The...

Vendor

A vendor is an individual or organization that sells goods or services to another individual or organization through a stable economic supply distribution system...

Attachment

An attachment is a file attached to an email message. Many email systems support sending text files as email. If the attachment is a...

Geotargeting

Geotargeting is a method of delivering data or content to users based on...

Agile Project Management

Agile project management enables business teams to approach their projects and tasks with...

Private 5G Network

A private 5G network is a private local area network (LAN) that utilizes...