carlessanagustin
5/31/2016 - 8:53 AM

Running processes in the background

Running processes in the background

Running processes in background

nohup

nohup COMMAND [ARG]...
echo $HOME/nohup.out

nohup make > make.log
nohup make > make.log &

help commands

ctrl+z # To pause a process and get back to the shell
jobs # Show the status of all background and suspended jobs
fg %jobnumber # Bring a job back into the foreground
bg %jobnumber # Bring a job back into the background

other commands:

dtach -A /tmp/dtach.session /bin/bash
screen
byobu
  • Method 1
  1. Run some some COMMAND
  2. ctrl+Z
  3. jobs
  4. bg %jobnum
  • Method 2
  1. Run some some COMMAND
  2. ctrl+Z
  3. jobs -l
  4. bg %jobnum &
  • Method 3
  1. Run some some COMMAND
  2. ctrl+Z
  3. bg
  4. disown -h %jobnum
  5. exit