89 / 102
Job Control Commands
Job control means switching between several jobs or processes.
A foreground job occupies the terminal which initialized it. It can be put in the background, so that the terminal can accept new commands.
command &
- Run
command
in the background. - Ctrl + C
- Terminate a process running in the foreground.
- Ctrl + Z
- Suspend a process running in the foreground.
bg
- Reactivate a suspended program in the background.
fg
- Place a job in the foreground, and make it the current job.
jobs
- Lists processes in the background. Each one has a number
n
and can be referred to by%n
.