Linux – What process is the parent of the init process in Linux

linuxpidprocess

Who or Which process is the parent of INIT process?
INIT is the first process which is initialized by the Kernel, kernel is not one process, So what is its parent process id value?

Best Answer

According to ps -ef, its parent process id is 0.

For example:

$ ps -ef | head -4
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Mar14 ?        00:00:03 init [2]  
root         2     0  0 Mar14 ?        00:00:00 [kthreadd]
root         3     2  0 Mar14 ?        00:00:17 [ksoftirqd/0]

It is conventional to say that init has no parent and that, therefore, the PPID value of 0 is a placeholder signaling that it has no parent. Alternatively, one might claim that the kernel is the "parent" of init and that the 0 signifies the kernel.

Related Question