On Linux operating systems, each process has its own identifier (PID).
We list all the processes and look at their PID:
Filter by process name, for example apache2:
ps axu | grep apache2
You can also see the PID of the process by running the command:
List of signals and their numbers that can be sent to the process:
We kill the process (where PID is the process number, the SIGTERM signal is sent to the process as standard):
We kill the process with the signal (for example 9):
kill -9 PID
An example of terminating processes by name:
killall -s 9 apache2
Help for commands:
Root rights may be required to kill some processes, then sudo must be added before the commands.