An ad-free and cookie-free website.
Learn to stop processes gracefully at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux kill Command Summary with Examples (3:46)
Our fifty-ninth word, or command to memorize is
kill from our category
kill allows you to send a signal to a
||List signal types by name or number|
||Send SIGNAL to the process|
Recall from video 45, we used the
ps command to view currently running
processes. Here we'll learn how to use
kill to, how do I say it, end a
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
kill command has
5 options and the argument is the process id (PID).
Unlike most commands, help is not available with double-dash
kill is a shell built-in (builtin)
on many Linux distributions. So instead try pointing to the
/bin/kill with a
The options are basically the type of signal to send. View signal
-l for names,
-L for number, and once you select the
-s and the number or
So why is
kill an important command?
Well, for troubleshooting and general system sluggishness at times
you have to intervene.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. Let's start by reviewing the different types of signals
sent to processes, here with
The default is
15 TERM and for really
misbehaving processes we have a number
9 KILL, and others to review later.
ps -a to see our processes.
Here's a sleep from video 43 and we don't need this any longer.
And last, at FactorPad, we don't condone killing anything, so instead
we'll send a politely phrased command
15 TERM to the process id (PID)
ps -a again to verify.
Very good. (Oh, btw, we dressed our Terminal in black on the video for Halloween. Boo!)
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
command. So please check out the
page for the command called
for an overview on signals.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
For more dark humor, check out our YouTube Channel. Get reminders at @factorpad on Twitter or on our no-spam email list.
historycommand, hit Back.
bg, click Next.
A newly-updated free resource. Connect and refer a friend today.