Linux Terminal Command: jobs
The jobs command is an essential tool in Process & Job Control. In this tutorial, we will explore what jobs does, look at everyday examples, and cover advanced options to supercharge your command-line workflow.
Concept & Explanation
The jobs command displays a list of active, stopped, or background processes running under the current terminal shell session.
Common Options & Syntax
jobs [options] [arguments]
Here are the most common flags used with jobs:
- Simple Usage: Basic default commands.
- Detailed View: Shows diagnostic information.
- Advanced Actions: Can chain parameters for scripting.
1. Interactive Example (Simple)
Here is how most people run the command:
# Example
jobs
What it does: Lists the active jobs in the current shell.
2. Power-User Example (Advanced)
For scripting and advanced diagnostics, use this configuration:
# Advanced
jobs -l -s
What it does: Lists only stopped jobs (-s) along with their process IDs (-l).
⚙️ Warning & Common Pitfalls
[!WARNING]
jobsis a shell builtin. It only displays processes started within the current terminal window, not system-wide processes.
🔗 Related Commands
Here are some related posts on cli_tty1 you might want to check out: