In this lesson, you will learn how every single process running on your Linux system traces its lineage back to a single "ancestor" process created during boot.
The Ancestor: Process ID 1
When you turn on your computer, the kernel loads and executes the very first user-space program. This program is known as init (or more commonly today, systemd). Regardless of the distribution, this process is assigned PID 1.
Every subsequent process on your system is a descendant of this original process. In our previous lesson on the "Forking and the Process Creation Model," we discussed how processes create new tasks by cloning themselves. Because of this, Linux maintains a strict process hierarchy—a tree structure where every child process knows its parent.
Visualizing the Hierarchy
You can see this lineage in action using the pstree command. This command displays processes as a tree, showing you exactly who started whom:
$ pstree -p
systemd(1)─┬─sshd(842)───sshd(910)───bash(912)───pstree(1504)
├─rsyslogd(620)
└─systemd-journal(350)
In the output above, systemd is at the top. When you log into your terminal, the sshd (SSH daemon) process forks a bash shell. If you run pstree from that shell, your pstree process identifies bash as its parent. If you trace the family tree upwards, you will always eventually arrive at PID 1.
Why the Hierarchy Matters
This ancestral structure is vital for system stability. When a process finishes, it notifies its parent. If a parent process crashes or terminates unexpectedly, its children are left without a guardian. In these cases, the "orphaned" processes are "re-parented" to PID 1.
By acting as the final parent, PID 1 ensures that even when processes behave unexpectedly, the system can clean up their resources and prevent them from lingering indefinitely as "zombies." Understanding this hierarchy is the first step in mastering how Linux maintains order among hundreds of running tasks.
Key Takeaway: All user-space processes exist in a hierarchical tree originating from PID 1 (init/systemd), which serves as the ultimate parent and supervisor for the entire system.