Skip to content

Instantly share code, notes, and snippets.

@ashrithr
Created April 5, 2014 01:11
Show Gist options
  • Save ashrithr/9986130 to your computer and use it in GitHub Desktop.
Save ashrithr/9986130 to your computer and use it in GitHub Desktop.
Send foreground process to background

Using the Job Control of bash to send the process into the background:

  1. ctrl+z to stop (pause) the program and get back to the shell
  2. bg to run it in the background
  3. disown -h [job-spec] where [job-spec] is the job number (like %1 for the first running job; find about your number with the jobs command) so that the job isn't killed when the terminal closes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment