Shell job control

Shells can run processes in the background, where they execute on their own, or in the foreground, attached to a terminal. Each process handled in this way is known as a job. Jobs are manipulated using job control commands:

bg [jobspec]

Place jobspec in the background as if it had been started with &.

fg [jobspec]

Place jobspec in the foreground, making it the current job.

jobs [jobspecs]

List jobspecs on standard output.

nohup [command] &

Execute command, detach it from the terminal, and allow it to continue running after the user logs out.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.