Exercise 1: Rescuing top With reptyr — Possible Solution ========================================================== Terminal A (not in screen): $ top ^Z (press Ctrl-Z) [1]+ Stopped top $ bg [1]+ top & $ jobs -l [1]+ 90213 Stopped (tty output) top $ disown %1 Note: top is an interactive, full-screen program, so in the background it stops again as soon as it tries to use the terminal ("Stopped (tty output)" or similar). That's fine — reptyr will wake it up on its new terminal. Terminal B: $ screen -S rescue $ reptyr 90213 If you see an error such as "Unable to attach to pid 90213: Operation not permitted", ptrace is restricted: $ cat /proc/sys/kernel/yama/ptrace_scope 1 $ sudo reptyr 90213 # or temporarily set the scope to 0 top now fills the screen window (press Ctrl-L if it needs a redraw). Prove it survives: Ctrl-a d # detach in terminal B (close terminal A completely) $ screen -r rescue # top is still running and updating WHY THIS WORKS AS AN ANSWER ------------------------------ It follows the full sequence, shows the most common failure (ptrace permission) and how to fix it, and ends with a real test: closing the original terminal. The exact error wording and job states vary between versions.