Linux Trick: Suspend, Background, and Disown a Running Process Without nohup
A developer running long scripts on a mini-server for a media-crawling hobby project needed a way to push already-started processes into the background without restarting them. Instead of relying on the usual nohup or tmux tools, they rediscovered a lesser-known Linux shell technique. The method involves pressing CTRL+Z to suspend a running process, typing 'bg' to resume it in the background, and then using 'disown -h %1' to detach it from the current shell session. Unlike nohup, which must be invoked before a process starts, this approach works on processes that are already running. The author notes it is particularly handy on servers where tmux is unavailable and cannot be installed.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in