What is the Linux command-line tool to list all currently running background processes, and how can I bring a specific background process to the foreground?
Tech Junction Answered question 6 hours ago
To list all currently running background processes in Linux, use the jobs
command:
# jobs
This command displays a list of background jobs started in the current shell session, along with their job IDs and status. To bring a specific background process to the foreground, use the fg
command followed by the job ID. For example, to bring job ID 1 to the foreground:
# fg %1
The job ID is shown in the jobs
output, prefixed with a %
. If you omit the job ID (e.g., fg
), it brings the most recent background job to the foreground.
Tech Junction Edited answer 5 hours ago