Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 2
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
4. Process control
  


Multiple background processes page 5 of 15


Now we have both a red and a blue xeyes running in the background. We can list these jobs with the bash built-in jobs:


$ jobs -l
[1]- 16217 Running                 xeyes -center red &
[2]+ 16224 Running                 xeyes -center blue &

The numbers in the left column are the job numbers bash assigned to these when they were started. Job 2 has a + (plus) to indicate that it's the "current job", which means that typing fg will bring it to the foreground. You could also foreground a specific job by specifying its number, in other words, fg 1 would make the red xeyes the foreground task. The next column is the process id or pid, included in the listing, courtesy of the -l option to jobs. Finally, both jobs are currently "Running", and their command lines are listed to the right.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact