|
|
You can run a process in the background, so that while it executes you can get on with something else, by appending an ampersand (&) to the command line, as follows:
$ vi tobermory & [1] 13560In this case, ``1'' is the job number and ``13560'' the process ID. Unlike PIDs, job numbers are allocated by the currently running shell, not by the operating system. While PIDs are assigned to all currently active processes, job numbers represent only active background processes, and while PIDs are unique across the system, job numbers are not.
Compound commands (where processes are linked using the semi-colon) should be grouped using parentheses, as follows:
$ (sleep 20; date > /dev/tty06) & [1] 25143 $ jobs [1] + Running (sleep 20; date > /dev/tty06)&