Next / Previous / Index / ITC Help System / Publications / Site map / NM Tech homepage

What is a background process?

Tech Computer Center logo

Normally, when you type a command, you don't get another prompt until that command has finished. However, if you end your command line with an ampersand (&), the command will start running ``in the background,'' and you will get another prompt right way. You can continue typing more commands while the background process is running. For example, to run a command called hypnotize_brick in the background, you might type:

    % hypnotize_brick&
    [1] 12393
    %
The second line tells you that your background job number is [1], and its process ID is 12393. You may need these numbers later to control the job. The next few topics will tell you how to use these numbers.

Warning: running a job in the background won't work unless it requires no keyboard input. If the background process needs keyboard input, you will see a message like this:

    [1]  + Stopped (tty input)  hypnotize_brick
See `Resuming a suspended process' for help in dealing with this situation.
Next: Running processes in parallel
See also: Controlling multiple processes
Previous: Running processes in sequence
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
Home: About New Mexico Tech

John Shipman, john@nmt.edu
Last updated: 1995/12/10 07:44:37 UT
URL: http://www.nmt.edu/tcc/help/unix/whatbg.html
QR two-dimensional bar code