Learn to show jobs at the Linux command line.
Linux jobs command summary with examples (3:39)
Videos can also be accessed from the YouTube Playlist.
Our sixty-third word, or command to memorize is
jobs from our category
jobs allows you to show jobs in the
Recall from videos 45, 59 and 60 on
bg, we saw jobs on the system, and
here we'll see jobs local to this terminal session.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
jobs command has
5 options and the argument is the job.
Unlike most commands, help is not available with double-dash
jobs is a shell built-in (builtin) on
most Linux distributions. Again, you can find details on job control in
man page on
-l option includes process IDs,
just as with the
ps command. Use
-r for running jobs and
-s for stopped jobs only.
So why is
jobs an important command?
Well, you might be only concerned with finding what you're doing in
your terminal session and not the whole system.
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. So maybe on your end the
command looks like this.
Nothing. Wondering if it's your system, you try
whatis and get this.
Don't despair, it's there, and
type says that it's a shell builtin.
So it works, but no local terminal jobs are present, so we'll create
sleep job for 5 minutes, like this.
And then now,
jobs shows the job.
We can add the Process ID (PID) number with
-r for running.
-s only show stopped jobs.
And last, let's bring the job to the foreground with
Then stop it with
And then run a
And there it is, stopped. Very good.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
command. So if that
fg command is new
to you, we didn't have a separate video (tutorial) on it, but did
mention it in video 60. If you want to check that out.
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:
Our YouTube Channel is about learning faster, subscribe here and check it out.
unamecommand, hit Back.
dpkgcommand, click Next.