kill : Terminal Command of the day

The command itself will speak what it does. It kills/stops/halts the process ;) . Technically speaking, kill is used to send signal to any running process and not just limited to killing the process.

Kill command requires the PID(Process ID).

The easiest way to kill a process is to send a KILL signal

kill -s kill <pid>


How to know the PID of any process. ?

Just type
ps ux
which will list all process running along with their PID's and other information . The list will be huge so to filter the one we require just add
ps ux | grep <processname>
 ex:
ps ux | grep firefox
Know the PID of the process
Know the PID of the process

(We will cover ps and grep command in later parts)

The PID will be second column after user name. So the PID of firefox is  3103.

To kill it i will send
kill -s kill 3103
 This post describes the very basic feature of kill. This is an advanced command and it can even operate on threads level.There are many signals that we can send to any process from this command.
man kill
for more information.

About This Blog

There is something for everyone. !! A tech blog on various topics. Let it be devops, programming etc; we have it all covered here in layman terms :)

Total Pageviews

Back to TOP