Is the terminal named “?” the grandmother of all processes?
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.
boot command-line init
New contributor
add a comment |
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.
boot command-line init
New contributor
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
add a comment |
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.
boot command-line init
New contributor
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.
boot command-line init
boot command-line init
New contributor
New contributor
edited 9 hours ago
wjandrea
8,49642259
8,49642259
New contributor
asked 22 hours ago
AliceAlice
1177
1177
New contributor
New contributor
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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:
- the boot loader loads the kernel and the initial RAM disk
- the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd
- if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
mechanism” section below.
- root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root
- /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).
- init mounts the “real” root file system
- init places the root file system at the root directory using the pivot_root system call
- init execs the /sbin/init on the new root filesystem, performing the usual boot sequence
- 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.
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 offork()
syscall
– Sergiy Kolodyazhnyy
20 hours ago
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:
- the boot loader loads the kernel and the initial RAM disk
- the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd
- if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
mechanism” section below.
- root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root
- /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).
- init mounts the “real” root file system
- init places the root file system at the root directory using the pivot_root system call
- init execs the /sbin/init on the new root filesystem, performing the usual boot sequence
- 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.
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 offork()
syscall
– Sergiy Kolodyazhnyy
20 hours ago
add a comment |
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:
- the boot loader loads the kernel and the initial RAM disk
- the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd
- if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
mechanism” section below.
- root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root
- /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).
- init mounts the “real” root file system
- init places the root file system at the root directory using the pivot_root system call
- init execs the /sbin/init on the new root filesystem, performing the usual boot sequence
- 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.
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 offork()
syscall
– Sergiy Kolodyazhnyy
20 hours ago
add a comment |
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:
- the boot loader loads the kernel and the initial RAM disk
- the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd
- if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
mechanism” section below.
- root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root
- /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).
- init mounts the “real” root file system
- init places the root file system at the root directory using the pivot_root system call
- init execs the /sbin/init on the new root filesystem, performing the usual boot sequence
- 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.
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:
- the boot loader loads the kernel and the initial RAM disk
- the kernel converts initrd into a “normal” RAM disk and frees the memory used by initrd
- if the root device is not /dev/ram0, the old (deprecated) change_root procedure is followed. see the “Obsolete root change
mechanism” section below.
- root device is mounted. if it is /dev/ram0, the initrd image is then mounted as root
- /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).
- init mounts the “real” root file system
- init places the root file system at the root directory using the pivot_root system call
- init execs the /sbin/init on the new root filesystem, performing the usual boot sequence
- 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.
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 offork()
syscall
– Sergiy Kolodyazhnyy
20 hours ago
add a comment |
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 offork()
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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