Move background jobs to the foreground for execution.
fg [job_spec ...]
Move background jobs (either running in the background or suspended) to the foreground terminal for execution.
If there is only one background task, the task ID can be omitted.
job_spec (Optional): Specifies the job identifier(s) to be moved to the foreground. One or more can be specified.
Returns the execution status of the job; returns failure if an error occurs.
# Run the sleep command, then press ctrl+z.
sleep 60
^Z
[1]+ Stopped sleep 60
# Use the fg command to move the job to the foreground.
fg %1
# Output:
sleep 60
bash job control commands include bg, fg, kill, wait, disown, and suspend.set option monitor to be enabled; check the job control status by typing set -o and looking for the monitor line; execute set -o monitor or set -m to enable this option.help command.