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 apache2 killall -s 9 apache2
Help for commands:
man ps man grep man pidof man kill man killall
Root rights may be required to kill some processes, then sudo must be added before the commands.