0
0
Linux CLIscripting~5 mins

jobs command in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the jobs command do in Linux?
The jobs command shows the list of background and suspended jobs in the current shell session.
Click to reveal answer
beginner
How do you identify a job's status using the jobs command?
The jobs command shows each job with a status like Running, Stopped, or Done next to its job number.
Click to reveal answer
beginner
What symbol is used to refer to a job in commands like fg or bg?
A job is referred to by a percent sign % followed by the job number, for example, %1 for job number 1.
Click to reveal answer
intermediate
How can you list all jobs including those from other sessions?
The jobs command only shows jobs from the current shell session. To see jobs from other sessions, you need to use other tools like ps.
Click to reveal answer
intermediate
What does the jobs -l option do?
The jobs -l option shows the job list with the process IDs (PIDs) of each job, giving more detailed information.
Click to reveal answer
What does the jobs command display?
AList of users logged into the system
BList of all running processes on the system
CList of background and stopped jobs in the current shell
DList of files in the current directory
How do you refer to job number 2 when using fg or bg commands?
A%2
B$2
C2
D#2
What does the status 'Stopped' mean in the jobs output?
AThe job is running in the background
BThe job is not found
CThe job has finished successfully
DThe job is paused and waiting
Which option with jobs shows process IDs?
A-l
B-p
C-r
D-s
Can jobs show jobs from other terminal sessions?
AYes, always
BNo, only current shell session
COnly if run as root
DOnly if jobs are running in background
Explain how to use the jobs command to check background tasks and how to bring a job back to the foreground.
Think about how you see jobs and how you can control them.
You got /4 concepts.
    Describe the difference between the jobs command and the ps command in Linux.
    Consider what each command is designed to show.
    You got /4 concepts.