[Chapter 12] 12.8 Job Control in a Nutshell
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:36:32Z

#

| Chapter 12 Job Control |

## 12.8 Job Control in a Nutshell

Unless otherwise noted, these commands apply only to the C shell, Korn shell, and bash:

- `command` `&` (1.26, 12.1): Run `command` in the background. You can continue to execute jobs in the foreground. All shells.

- `CTRL-c` (38.9): Kill the current foreground job by sending the INTR signal (38.8). All shells.

- `CTRL-z` (12.1, 12.4): Suspend the current foreground job by sending the TSTP signal (38.8).

- Suspend a shell with the suspend command (22.22).

- Suspend a background job with the stop command or an alias that does the same thing (12.5).

- `bg %``num` (12.1): Let a stopped job (by job number `num`) continue in the background.

- `fg %``num` (12.1): Put a background job or a stopped job (by job number `num`) into the foreground.

- `kill %``num` (12.1): Kill an arbitrary background job (by job number `num`).

- `kill` `pid` (38.10): Kill an arbitrary job (by process ID number `num`). All shells.

- `jobs` (12.1): List background and stopped jobs and their job numbers.

- `set notify` (12.6): Immediate job-state change notices.

- `stty tostop` (12.7): Automatically stop background processes if they try writing to the screen.

- ML

12.7 Stop Background Output with stty tostop |  | 12.9 Running Multiple Shell Sessions with screen