Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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