Learn to list and modify running jobs at the Linux command line.
Linux ps command summary with examples (3:36)
Videos can also be accessed from the YouTube Playlist.
Our forty-fifth word, or command to memorize is
ps from our category
ps allows you to print a snapshot of
Recall that we just covered automating commands, and now we'll be able to monitor the system behind the scenes.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
ps command has
over 40 options and there really aren't arguments per
se, just a whole slew of options, and I'll prevent us from getting into
minutiae here, and keep it very basic.
Like most commands, help is available with double-dash
--help and it's multi-layered, making
it very, for lack of a better word, helpful.
T option shows processes in the
current terminal session, and
beyond that. These are capital letters on my version of
ps and I should mention other
versions: Unix, BSD and GNU may differ.
So why is
ps an important command?
Well, not only for security is it important to monitor the system, but
you may need to intervene now and again.
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 look at the multi-layered help system, typing
Which provides other options, like
ps --help simple.
As you can see here, and then last, let's type
And there are two processes running,
PID is the process ID number, TTY is
the terminal, STAT is the status,
here it's sleeping or running, but there are more, and
TIME is the time spent on the CPU.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
So if you want a constantly updating version of
top command, especially if you
are a very curious person. Everyone should try it at least once in
their lives. Oh, letter
q is the safe
word that gets you out of the
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:
Click here to join our growing YouTube Channel.
crontabcommand, hit Back.
printenvcommand, click Next.