Go to the previous, next section.

Job Control Builtins

bg
bg [jobspec]
Place jobspec into the background, as if it had been started with `&'. If jobspec is not supplied, the current job is used.

fg
fg [jobspec]
Bring jobspec into the foreground and make it the current job. If jobspec is not supplied, the current job is used.

jobs
jobs [-lpn] [jobspec]
jobs -x command [jobspec]

The first form lists the active jobs. The -l option lists process IDs in addition to the normal information; the -p option lists only the process ID of the job's process group leader. The -n option displays only jobs that have changed status since last notfied. If jobspec is given, output is restricted to information about that job. If jobspec is not supplied, the status of all jobs is listed.

If the -x option is supplied, jobs replaces any jobspec found in command or arguments with the corresponding process group ID, and executes command, passing it arguments, returning its exit status.

suspend
suspend [-f]
Suspend the execution of this shell until it receives a SIGCONT signal. The -f option means to suspend even if the shell is a login shell.

When job control is active, the kill and wait builtins also accept jobspec arguments.

Go to the previous, next section.