HCI Data Ltd
Linux Background Job
Home Internet tools
 

A task can usually be started and run as a background task by putting a '&' at the end of the command line.

If a task was started and is running in the foreground, it is still possible to move it to the background without cancelling it. To move a task from the foreground to the background perform the following steps:

  1. CTRL-Z (That is, while holding the CTRL key down, tap the 'z' key) This will suspend the current foreground job (task).
  2. Enter the job control command 'bg'
  3. Tap the 'Enter' key

The job is now running in the background.

Useful commands to see which jobs are still running is the 'jobs' or the 'ps ua' commands. If the 'jobs' command is used, a background jobs can be brought to the foreground with the command fg n where n is the job (not the PID) number.




HCI Data Ltd is a member of the Federation of Small Businesses
Last Updated: Monday, 04-Feb-2019
HCI Data Ltd.