The very short version: Unix PIDs do start at 0! PID 0 just isn’t shown to userspace through traditional APIs. PID 0 starts the kernel, then retires to a quiet life of helping a bit with process scheduling and power management. Also the entire web is mostly wrong about PID 0, because of one sentence on Wikipedia from 16 years ago.
There’s a slightly longer short version right at the end, or you can stick with me for the extremely long middle bit!
But surely you could just google what PID 0 is, right? Why am I even publishing this?
↫ David Anderson
What a great read. Just great.