Home

initdefault

Initdefault is a term used in System V style init systems to designate the line in the inittab configuration that tells the init process which runlevel to boot into by default. The inittab file, read by the init daemon at boot, contains entries that define how and when to start system services for each runlevel. The line labeled or associated with initdefault serves as the boot-time default, guiding init to switch to that runlevel automatically during startup.

In practice, an initdefault entry typically appears as a line such as id:3:initdefault: or id:5:initdefault:. The

This mechanism is part of the broader concept of runlevels, which are predefined states of the system

exact
field
order
in
inittab
is
id:runlevels:action:process,
and
the
initdefault
line
uses
the
initdefault
action
to
indicate
the
default
runlevel.
When
the
system
boots,
init
scans
inittab,
finds
this
default
directive,
and
then
proceeds
to
initialize
the
system
services
defined
for
that
runlevel.
(for
example,
single-user
mode,
multi-user
mode,
or
halt).
While
widely
used
on
traditional
Unix
and
many
Linux
distributions,
the
approach
has
become
less
common
with
newer
init
systems.
Modern
systems
using
Upstart
or
systemd
typically
do
not
rely
on
inittab
to
set
a
default
runlevel;
systemd
uses
targets
(such
as
multi-user.target)
and
a
default.target,
and
Upstart
uses
its
own
job
configurations.
Nevertheless,
initdefault
remains
a
key
concept
in
understanding
historical
SysVinit
behavior
and
the
boot
process
on
legacy
or
compatibility-focused
systems.