A 'screen' quickstart
A 'screen' quickstart
Posted Aug 23, 2006 1:04 UTC (Wed) by kmself (guest, #11565)In reply to: duh question by ccyoung
Parent article: Using screen for remote interaction (Linux.com)
A few getting started pointers for screen.
First: one of the major benefits is persistance. That is, your screen session will continue running after your initial session is disconnected. This means you can connect and disconnect at will, even from different locations, and can deal more manageably with intermittent connections (you know, those ones where you're not intentionally disconnecting, technical term is "flaky").
Second: screen gives you some neat capabilities, among them:
- Multiple windows. A single screen session can consist of multiple shell (or other program) instances. If you're familiar with tabbed terminal programs (e.g.: GNOME Terminal, Konsole), the concept's similar, but the management is at the remote side, and isn't lost when your terminal dies. Upwards of 30 windows, first ten are accessible with C-a-number-key.
- Split screens. You can split a single screen window into two or more simultaneously visible panes, and navigate between these with C-a-tab. Forward nav only. Useful for keeping a 'top' session running while executing other commands.
- Named windows. You can name windows to make it easier to sort out which ones are what, e.g.: 'root', 'mail', 'code', 'top', 'logs', etc.
- Copy/paste. If you're not running under X11 or another environment (e.g.: gpm, PuTTY) which allows native cut and paste, screen offers its own mechanism. Not the smoothest, but a possible lifesaver.
To list screen sessions: 'screen -ls'. To attach if you've only got one existing session: 'screen -rd'. To attach to a specific window: 'screen -r screensession' (the screen session is displayed in the prior list output).
That's the basics, there's more, but you'll get a lot of mileage with just the above. RTFM or 'C-a-?' for internal help.