Thursday, 28th August 2008
Basically anything you run on a machine is a job. So whatever you have running in the terminal is a job. Something as simple as displaying a manual page, creating a talk session to another user or even checking your mail using mutt or pine are all jobs.
$ info
This creates a new job called info, which is part of the help system available for linux. Pressing the 'q' key will exit the program.
There's a section devoted to the info program so when you really feeling up to you can go read that, but for the moment we're just going to use it as part of the demonstration for explaining what a job is so don't worry about using it. If you get stuck just press the 'q' key a few times to get out of it.
In any case when you type in the command and press return the screen changes, info is the job displaying output to the window and as a result is regarded as the foreground job. Then any other jobs are regarded as background jobs.
Ctrl+Z
[1]+ Stopped info
$ jobs
[1]+ Stopped info
With this job number we can use
$ %1
Before we start the next section we need to jump back out of the info program so using the same key presses as before:
Ctrl+Z
[1]+ Stopped info
And we return to the command line. Now lets learn how to suspend a job.