Learn how the shell ampersand sends jobs to the background, how to manage them, and when to use stronger tools. 11.02.2026 | reading time: 3 min Want to continue working while a long command runs? Put it in the background with the shell operator `&` and keep the terminal free for other tasks. A quick demonstration Start a short background task, inspect it, and detach: ```bash sleep 60 & # shell prints the job number and PID, for example: [1] 32456 jobs # shows running jobs, for example: [1]+ Running sleep 60 # Redirect output and run another command in background: ./my-script.sh > output.log 2>&1 & [2] 32457 # Remove job from the shell job table so logout won't send SIGHUP: disown %2 ``` What the ampersand actually does The `&` operator tells the shell to start the command in a new process and return the prompt immediately; it does not by itself isolate the process from terminal signals, so `jobs`, `fg` and `bg` are used to list and control those jobs and `disown` or `nohup` are needed to survive a logout. Practical tips and pitfalls If the command writes to the terminal, redirect stdout and stderr before appending `&` (for example `mycmd >out.log 2>&1 &`), or use `nohup` or `setsid` to avoid SIGHUP on logout; remember that `&` is a shell feature not a replacement for session managers like `screen` or `tmux`. When you need more than & For long interactive jobs or reliable background services prefer session managers or user services: use `screen` or `tmux` for persistent interactive sessions, or systemd user units for supervised, restartable background services. Next steps Practice: run a background task, check it with `jobs`, bring it back with `fg`, and try `disown` to see how logout behavior changes; then explore `nohup` and a terminal multiplexer to understand differences. Keep experimenting: mastering `&` and job control improves daily work on the shell, and learning when to switch to `nohup`, `screen`, `tmux` or systemd will make scripts and services robust. Join Bits & Bytes Academy First class LINUX exam preparation. utilities processes scripting troubleshooting