Interview Prep/Linux/Processes, Signals & systemd

How are new processes created in Linux?

IntermediateConceptProcesses, Signals & systemd
Answer

Through fork() (or clone()), which duplicates the parent using copy-on-write memory, followed by execve(), which replaces the child's image with a new program. The shell does exactly this for every external command. The parent then calls wait() to collect the exit status.

pstree -p $$
All Linux questions Roadmap: Linux

More on Processes, Signals & systemd