Is it possible to reattach a process started with nohup?

For example, start in a terminal:

nohup tail -f /dev/null &

Close the terminal. Now open a new terminal. How do you reattach the nohup'd process to this new terminal?


You can use tools such as reptyr to reattach a running process to a new terminal, generally speaking though it's a lot simpler to plan ahead and simply launch the process inside screen or tmux - that way you don't need nohup, and you can connect/disconnect at will.

| improve this answer | |
  • I hoped there would be a standard utility for it. Screen is not available on the machines where the command was started with nohup – user300811 Mar 8 '12 at 14:30
  • if screen isn't available, I assume that means you don't have root access and therefore can't install anything. Which means: you're left with tailing a log file as your "available" options for the circumstances you've described. – AD7six Mar 8 '12 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.