Is the terminal named “?” the grandmother of all processes?












1















When I invoke the gnome-control-center from the search bar



searching for "gnome-control" in the Applications menu



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.



diagram from book










share|improve this question









New contributor




Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Note that tty2 is already open - that's the TTY that the GUI runs on (in 18.04). For more details see What is a tty, and how do I access a tty? Also the system doesn't press Enter to execute a command, but I'm not sure how it actually works.

    – wjandrea
    8 hours ago
















1















When I invoke the gnome-control-center from the search bar



searching for "gnome-control" in the Applications menu



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.



diagram from book










share|improve this question









New contributor




Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Note that tty2 is already open - that's the TTY that the GUI runs on (in 18.04). For more details see What is a tty, and how do I access a tty? Also the system doesn't press Enter to execute a command, but I'm not sure how it actually works.

    – wjandrea
    8 hours ago














1












1








1


1






When I invoke the gnome-control-center from the search bar



searching for "gnome-control" in the Applications menu



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.



diagram from book










share|improve this question









New contributor




Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












When I invoke the gnome-control-center from the search bar



searching for "gnome-control" in the Applications menu



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.



diagram from book







boot command-line init






share|improve this question









New contributor




Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 9 hours ago









wjandrea

8,49642259




8,49642259






New contributor




Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 22 hours ago









AliceAlice

1177




1177




New contributor




Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Note that tty2 is already open - that's the TTY that the GUI runs on (in 18.04). For more details see What is a tty, and how do I access a tty? Also the system doesn't press Enter to execute a command, but I'm not sure how it actually works.

    – wjandrea
    8 hours ago



















  • Note that tty2 is already open - that's the TTY that the GUI runs on (in 18.04). For more details see What is a tty, and how do I access a tty? Also the system doesn't press Enter to execute a command, but I'm not sure how it actually works.

    – wjandrea
    8 hours ago

















Note that tty2 is already open - that's the TTY that the GUI runs on (in 18.04). For more details see What is a tty, and how do I access a tty? Also the system doesn't press Enter to execute a command, but I'm not sure how it actually works.

– wjandrea
8 hours ago





Note that tty2 is already open - that's the TTY that the GUI runs on (in 18.04). For more details see What is a tty, and how do I access a tty? Also the system doesn't press Enter to execute a command, but I'm not sure how it actually works.

– wjandrea
8 hours ago










1 Answer
1






active

oldest

votes


















3














The ? symbol indicates that there is no tty associated with the process. In other words, there is no real or virtual device where that process can write information. However, the /sbin/init process is in fact "grandmother" of all processes on the system, directly or indirectly. Where does it come from ? The Linux kernel starts it. The kernel can be called "grand-grandmother" of all processes. The steps are described in Linux kernel documentation:




Operation



When using initrd, the system typically boots as follows:




  1. the boot loader loads the kernel and the initial RAM disk

  2. the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd

  3. if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
    mechanism” section below.

  4. root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root

  5. /sbin/init is executed (this can be any valid executable, including shell scripts; it is run with uid 0 and can do basically everything
    init can do).

  6. init mounts the “real” root file system

  7. init places the root file system at the root directory using the pivot_root system call

  8. init execs the /sbin/init on the new root filesystem, performing the usual boot sequence

  9. the initrd file system is removed




Note also that ? indicates it is a daemon. To quote daemon(7) man page:




A daemon is a service process that runs in the background and
supervises the system or provides functionality to other processes.







share|improve this answer


























  • Thank you and get the idea of kernel. they are of kernel's system call 'fork'

    – Alice
    20 hours ago











  • @Alice Yes, exactly. All processes on Linux are result of fork() syscall

    – Sergiy Kolodyazhnyy
    20 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Alice is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110150%2fis-the-terminal-named-the-grandmother-of-all-processes%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














The ? symbol indicates that there is no tty associated with the process. In other words, there is no real or virtual device where that process can write information. However, the /sbin/init process is in fact "grandmother" of all processes on the system, directly or indirectly. Where does it come from ? The Linux kernel starts it. The kernel can be called "grand-grandmother" of all processes. The steps are described in Linux kernel documentation:




Operation



When using initrd, the system typically boots as follows:




  1. the boot loader loads the kernel and the initial RAM disk

  2. the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd

  3. if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
    mechanism” section below.

  4. root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root

  5. /sbin/init is executed (this can be any valid executable, including shell scripts; it is run with uid 0 and can do basically everything
    init can do).

  6. init mounts the “real” root file system

  7. init places the root file system at the root directory using the pivot_root system call

  8. init execs the /sbin/init on the new root filesystem, performing the usual boot sequence

  9. the initrd file system is removed




Note also that ? indicates it is a daemon. To quote daemon(7) man page:




A daemon is a service process that runs in the background and
supervises the system or provides functionality to other processes.







share|improve this answer


























  • Thank you and get the idea of kernel. they are of kernel's system call 'fork'

    – Alice
    20 hours ago











  • @Alice Yes, exactly. All processes on Linux are result of fork() syscall

    – Sergiy Kolodyazhnyy
    20 hours ago
















3














The ? symbol indicates that there is no tty associated with the process. In other words, there is no real or virtual device where that process can write information. However, the /sbin/init process is in fact "grandmother" of all processes on the system, directly or indirectly. Where does it come from ? The Linux kernel starts it. The kernel can be called "grand-grandmother" of all processes. The steps are described in Linux kernel documentation:




Operation



When using initrd, the system typically boots as follows:




  1. the boot loader loads the kernel and the initial RAM disk

  2. the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd

  3. if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
    mechanism” section below.

  4. root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root

  5. /sbin/init is executed (this can be any valid executable, including shell scripts; it is run with uid 0 and can do basically everything
    init can do).

  6. init mounts the “real” root file system

  7. init places the root file system at the root directory using the pivot_root system call

  8. init execs the /sbin/init on the new root filesystem, performing the usual boot sequence

  9. the initrd file system is removed




Note also that ? indicates it is a daemon. To quote daemon(7) man page:




A daemon is a service process that runs in the background and
supervises the system or provides functionality to other processes.







share|improve this answer


























  • Thank you and get the idea of kernel. they are of kernel's system call 'fork'

    – Alice
    20 hours ago











  • @Alice Yes, exactly. All processes on Linux are result of fork() syscall

    – Sergiy Kolodyazhnyy
    20 hours ago














3












3








3







The ? symbol indicates that there is no tty associated with the process. In other words, there is no real or virtual device where that process can write information. However, the /sbin/init process is in fact "grandmother" of all processes on the system, directly or indirectly. Where does it come from ? The Linux kernel starts it. The kernel can be called "grand-grandmother" of all processes. The steps are described in Linux kernel documentation:




Operation



When using initrd, the system typically boots as follows:




  1. the boot loader loads the kernel and the initial RAM disk

  2. the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd

  3. if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
    mechanism” section below.

  4. root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root

  5. /sbin/init is executed (this can be any valid executable, including shell scripts; it is run with uid 0 and can do basically everything
    init can do).

  6. init mounts the “real” root file system

  7. init places the root file system at the root directory using the pivot_root system call

  8. init execs the /sbin/init on the new root filesystem, performing the usual boot sequence

  9. the initrd file system is removed




Note also that ? indicates it is a daemon. To quote daemon(7) man page:




A daemon is a service process that runs in the background and
supervises the system or provides functionality to other processes.







share|improve this answer















The ? symbol indicates that there is no tty associated with the process. In other words, there is no real or virtual device where that process can write information. However, the /sbin/init process is in fact "grandmother" of all processes on the system, directly or indirectly. Where does it come from ? The Linux kernel starts it. The kernel can be called "grand-grandmother" of all processes. The steps are described in Linux kernel documentation:




Operation



When using initrd, the system typically boots as follows:




  1. the boot loader loads the kernel and the initial RAM disk

  2. the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd

  3. if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
    mechanism” section below.

  4. root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root

  5. /sbin/init is executed (this can be any valid executable, including shell scripts; it is run with uid 0 and can do basically everything
    init can do).

  6. init mounts the “real” root file system

  7. init places the root file system at the root directory using the pivot_root system call

  8. init execs the /sbin/init on the new root filesystem, performing the usual boot sequence

  9. the initrd file system is removed




Note also that ? indicates it is a daemon. To quote daemon(7) man page:




A daemon is a service process that runs in the background and
supervises the system or provides functionality to other processes.








share|improve this answer














share|improve this answer



share|improve this answer








edited 21 hours ago

























answered 21 hours ago









Sergiy KolodyazhnyySergiy Kolodyazhnyy

70.8k9147310




70.8k9147310













  • Thank you and get the idea of kernel. they are of kernel's system call 'fork'

    – Alice
    20 hours ago











  • @Alice Yes, exactly. All processes on Linux are result of fork() syscall

    – Sergiy Kolodyazhnyy
    20 hours ago



















  • Thank you and get the idea of kernel. they are of kernel's system call 'fork'

    – Alice
    20 hours ago











  • @Alice Yes, exactly. All processes on Linux are result of fork() syscall

    – Sergiy Kolodyazhnyy
    20 hours ago

















Thank you and get the idea of kernel. they are of kernel's system call 'fork'

– Alice
20 hours ago





Thank you and get the idea of kernel. they are of kernel's system call 'fork'

– Alice
20 hours ago













@Alice Yes, exactly. All processes on Linux are result of fork() syscall

– Sergiy Kolodyazhnyy
20 hours ago





@Alice Yes, exactly. All processes on Linux are result of fork() syscall

– Sergiy Kolodyazhnyy
20 hours ago










Alice is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Alice is a new contributor. Be nice, and check out our Code of Conduct.













Alice is a new contributor. Be nice, and check out our Code of Conduct.












Alice is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110150%2fis-the-terminal-named-the-grandmother-of-all-processes%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

GameSpot

日野市

Tu-95轟炸機