First, you must know the process ID or its name. To see the list of processes, you can execute:
Once you know which process is it you want to kill, you execute:
PID is the process ID number returned by
ps. You can also use the command
killall with the real process name. So for example, if you want to stop firefox from the CLI, you can either execute:
or:
Code:
kill -9 firefox-PID
firefox-PID is the real ID number returned by
ps.
There is also
pkill (I haven't used this one, but you can check the man page for it, if you're interested to know about it:
man pkill).
(Of course, you must be careful about which processes you kill, since there are critical process that, if killed, may cause data loss or an unstable system).