XK0-004 · Question #54
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
The correct answer is B. /sbin/init. When using SysV init, the Linux kernel launches /sbin/init as PID 1 - the first user-space process - which then manages all subsequent service and process initialization.
Question
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
Options
- A/lib/init.so
- B/sbin/init
- C/etc/rc.d/rcinit
- D/proc/sys/kernel/init
- E/boot/init
How the community answered
(37 responses)- A3% (1)
- B92% (34)
- C3% (1)
- E3% (1)
Why each option
When using SysV init, the Linux kernel launches `/sbin/init` as PID 1 - the first user-space process - which then manages all subsequent service and process initialization.
`/lib/init.so` is not a valid init path; `.so` files are shared libraries loaded by executables, not standalone programs invoked directly by the kernel.
`/sbin/init` is the standard path for the SysV init binary; the kernel, after mounting the root filesystem, executes this program as PID 1, and it reads `/etc/inittab` to determine the default runlevel and spawns all other processes. It remains the parent of all user-space processes for the lifetime of the system.
`/etc/rc.d/rcinit` is not a real file; `/etc/rc.d/` contains runlevel startup scripts that are invoked by init, not init itself.
`/proc/sys/kernel/init` does not exist as an executable - `/proc/sys/kernel/` is a virtual filesystem exposing kernel parameters, not a location for binaries.
`/boot/init` is not the init binary location; the `/boot` directory holds kernel images and bootloader files, not user-space programs.
Concept tested: Linux SysV init PID 1 and boot process
Source: https://man7.org/linux/man-pages/man8/init.8.html
Topics
Community Discussion
No community discussion yet for this question.