Effortless Process Suspension and Resumption with `Ctrl+Z` and `fg`/`bg`
Quick Tip
Effortless Process Suspension and Resumption with `Ctrl+Z` and `fg`/`bg`
Challenge: You’ve started a long-running command in your terminal, but realize you need to run another command or perform a different task without closing the current session or killing the process. You don’t want to lose your progress on the first command.
The Solution: Use `Ctrl+Z` to suspend the foreground process, and then `fg` or `bg` to manage its state.
# To suspend the current foreground process Ctrl+Z # To bring a suspended process back to the foreground fg # To move a suspended process to the background bg
Why it works: `Ctrl+Z` sends a SIGTSTP signal to the foreground process, which suspends its execution. The `fg` command brings a suspended process back to the foreground, and `bg` allows it to continue running in the background, freeing up your terminal for other tasks.
Pro-Tip: Use the `jobs` command to list all suspended and backgrounded processes in your current shell session.
Linux Tips & Tricks | © ngelinux.com | 4/30/2026
