When doing administrative stuff on my headless Linux server I sometimes need to keep a command running, even if I lose my shell connection. The screen command works very well for this, but it also has a lot of other helpful features – ones that I keep forgetting how to use since I don’t play around on the console enough anymore. So I created this concise list of often used and forgotten commands :).
- Detach Screen: Ctrl+A, d
- Get running screen sessions: screen -ls
- Reattach Screen: screen -r <id>
Many thanks to this blogpost from 2008 by Jeffrey Huckaby that I have repeatedly looked at (I am ashamed to admit)…
http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/