Thursday, 20th November 2008
Once a job has been backgrounded there has to be a way to bring it back into the foreground, or make it active again if its been suspended. This section deals with both. The command is fairly intuitive, bg was used to background, and the foreground is fg. By default this works on the most recent job suspended or backgrounded.
Get the current list of jobs running.
$ jobs
[1]+ Stopped info
[2]- Stopped man info
To bring the most recent job which is info,
$ fg
You should now see the info interface which all the general subjects listed. Lets suspend this again for the time being.
Ctrl+Z
[1]+ info &
[1]+ Stopped info
The other method like in backgrounding a job is you can specify the job number to bring that one into the foreground and in most cases make it the active one displaying output to your terminal.
$ fg %2
For now we've seen how to manipulate jobs so the last step is to see the different methods of listing jobs.