Bash - process

Bash Liste Des Attaques Ovh


This article is about the bash Process.

To see how to manage another general linux process, see Linux - Process



  • The process running the command is created.
  • The process inherits the stdin, stdout, and stderr from the shell. Because it inherits stdin, it stay connected to the same terminal.
  • If the shell receives a SIGHUP, it also sends a SIGHUP to the process (which normally causes the process to terminate).
  • Otherwise the shell waits (is blocked) until the process terminates.


  • & puts the job in the background: ie
    • it block on attempting to read input,
    • and makes the shell not wait for its completion.
    • removes the process from the shell's job control,
    • leaves the process connected to the terminal. The shell won't send it a SIGHUP. Obviously, it can only be applied to background jobs, because you cannot enter it when a foreground job is running.
    • disconnects the process from the terminal,
    • redirects its output to nohup.out
    • shields the process from SIGHUP. One of the effects (the naming one) is that the process won't receive any sent NOHUP. It is completely independent from job control and could in principle be used also for foreground jobs (although that's not very useful).

Builtin Stop

While executing in non-interactive mode and while in posix mode, any special builtin like:

exiting with a non-zero status causes the shell to stop execution.


Environment variable


From the bash man page: $ Expands to the process ID of the shell. In a () subshell, it expands to the process ID of the current shell, not the sub-shell.

echo $$

The $$ variable often finds use in scripts to construct “unique” temp file names


BASHPID: Process ID of the current instance of Bash. bash 4



The $PPID of a process is the process ID (pid) of its parent process.


The PID (process ID) of last job run in background

Documentation / Reference

Discover More
Bash Liste Des Attaques Ovh
Bash - Kill a process

How to kill a process kill is bash builtin command Send the signal named by sigspec or signum to the processes named by pid or jobspec. sigspec is either a case-insensitive signal name such as...
Bash Liste Des Attaques Ovh
Bash - Special Parameter

Special parameters are Parameters treated specially. metacharacter ?? These parameters may only be referenced; assignment to them is not allowed. Positional parameter expansion Star () At...
Bash Liste Des Attaques Ovh
How to check a port? locally and remotely on Linux

This page is Port management on Linux. When you install a software (process), you need often to verify the available port in order to configure the component installation. with netstat, you can check...
Linux - (Proc|Process) Filesystem (procfs)

procfs (or the proc filesystem) is a special filesystem in UNIX-like operating systems that presents performance metrics linux processes and other system information in a hierarchical file-like structure...
Bash Liste Des Attaques Ovh
Linux - ps (process statut)

Report a snapshot of the current processes. top This ps works by reading the virtual files in /proc. To print a process tree: Sort where the flag: -e selects every process -f...
Bash Liste Des Attaques Ovh
Sh - Special Characters

special character See also: special Parameters the point: >, >>, |, < : the tilde (~): the user directory home $?: the exist status $$: the PID of the parent process ...

Share this page:
Follow us:
Task Runner