Title: Process Control
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review > Section: Learning Modules

You can start a background job by typing a command and placing an ampersand (&) after the command.

- Example: ls -lRa / > filelist 2> errorlist &
- The numbers that you get show the job number (in brackets) and the PID.

You can list all of your background jobs with the jobs command. NOTE: Jobs and numbers are related to your session, not the system. Numbers are unique for your session, not for the system.

Job Control

The bg command can be used to start a paused job in the background.

- Example: bg %2
- Starts job 2 in the background.

● The fg command can be used to start a paused job in the foreground.

- Example: fg %2
- Starts job 2 in the foreground
- Foreground tasks/commands/jobs can be paused by hitting <ctrl-z> or can be terminated by hitting <ctrl-c>.