Controlling Programs

Most (but not all) shells support some form of control over background processes. Important features include the following:

  • Listing current background programs

  • Pausing running programs

  • Stopping running processes

  • Bringing to the foreground programs sent to the background

Controlling background programs is called job control.

Using Job Control

Use job control to manage multiple running programs. You can start programs in the background from the bash shell command line with the & operator, or you can suspend a program by pressing Ctrl+z. The shell will respond by printing a job number, followed by a process number of the program:

$ sc &
[1] 2689

Running programs sent to the background with Ctrl+z will disappear, and the shell ...

Get Practical Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.