kill
To get a list of all the available signals which one can send to a process use kill -l. For example, the standard signal to send to a program to kill it is the SIGKILL signal, which has the signal ID 9. So, let's first create a new process and then kill it; as an example, start a new sleep process in the background. As you already have learned, putting a process into the background prints out the process ID. Most of the time, we use the kill command to kill system processes, which usually are not started by our user. So a standard way to retrieve is using the ps option, aux, and then filter by the name of the process you want to kill. Using ps with the option aux prints out the full command line, which often is helpful to differentiate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access