Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)
Correct Answer:
jobs
Explanation
The jobs command displays a list of all background tasks running in the current shell. A background task is a process that is started with the & operator or suspended with Ctrl+Z and resumed with the bg command. The jobs command shows the job number, the status, and the command name of each background task. For example, the following output shows two background tasks: one is running (sleep 10) and one is stopped (ping www.howtogeek.com).
1- Running sleep 10 & 2+ Stopped ping www.howtogeek.com
References:
* [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Objective 103.5: Create, monitor and kill processes, Weight: 4, Key Knowledge Areas: Use of jobs, fg and bg commands.
* How to Run and Control Background Processes on Linux, Topic: The jobs Command.