Processes are used by the Linux kernel, started by a user, or created by other processes. All processes are child processes of process number one, which will be covered in the next chapter. In this section, we learn to identify processes and how to send a signal to a process.
Process management
View processes
If you start a program, a process ID (PID) is assigned to the process and a corresponding directory is created in /proc.
In Bash, you can find the PID of the current shell with the command:
echo $$
You can also find the PID of the parent shell:
echo $PPID
To find the PID of a program on your filesystem, the utility pidof is available, for instance:
pidof ssh
If you want to use pidof to find running scripts, including...