Where to start First steps track · 15 stages
Linux Labs

Background jobs in the shell — &, jobs, nohup

cheat sheet · bash https://lab.dimsanych.ru/en/wiki/background-jobs/

Cheat sheet

  • cmd & send to background
  • jobs -l list background jobs + PID
  • fg %1 bring job 1 to the foreground
  • bg %1 resume job 1 in the background
  • Ctrl+Z suspend
  • nohup cmd > out.log 2>&1 & survive logout
  • cmd1 & cmd2 & wait run in parallel and wait
  • a service — use systemd; a long interactive task — use tmux
Loading…