When I invoke the gnome-control-center
from the search bar
The true command which the os runs can be found in ps
:
me@alpha:~$ ps -ef | grep gnome-control-center
me 13952 7293 0 12:20 tty2 00:00:00 gnome-control-center
me 15523 7835 0 12:27 pts/0 00:00:00 grep --color=auto gnome-control-center
It indicates that the operating system opens a terminal tty2
, inputs command gnome-control-center
, and presses Enter.
When it comes to the init or systemd process
me@alpha:~$ ps -ef | head -5
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 10:34 ? 00:00:05 /sbin/init splash
root 2 0 0 10:34 ? 00:00:00 [kthreadd]
root 3 2 0 10:34 ? 00:00:00 [rcu_gp]
root 4 2 0 10:34 ? 00:00:00 [rcu_par_gp]
With reference to the PID 1, its command is /sbin/init splash
.
From where is it input, /sbin/init splash
, and press Enter?
The tty is ?
which stands for a daemon process.
Is it right if I understand that daemon processes are invoked from a terminal whose name is ?
and this terminal is the grandmother of all processes?
Note:
Thanks for Sergiy's tutorial about Kernel.
I got the idea intuitively from a picture from a book called "Advanced Programming in the Unix Environment".
The system call fork
is to spawn a new process which could be called from shell or from applications.