If you're sick of opening a new terminal window for every application, GNU Screen is here to save the day. It's a simple little program that comes pre-installed in Linux, BSD, and Mac OS X, and it allows you to page through multiple console applications from the same terminal window. Imagine reading your mail, editing text, and running a sorting application—all from the same terminal on your desktop! To get started, just type "screen" at the command line prompt. You'll get a welcome screen, and then you'll hit return. It looks like you've been taken back to the prompt, but now you're in GNU Screen. Start an application, like a text editor. Then hit ctrl-a, followed by letter c. This creates a new window (you'll see a new command prompt). Start your next application, then hit ctrl-a, followed by p. Now you've paged back to your previous window, with the text editor. Presto, two terminals in one! But wait, there's more.

The real beauty part of GNU Screen is that it doesn't kill applications when you close your terminal window. So you can keep your favorite apps running after shutdown. When you type "screen" into a new terminal window, you can get right back to your most-used apps just by paging through with ctrl-c p.

Another great way to use GNU Screen is for workspace sharing with a trusted colleague who has access to your machine. GNU Screen allows two people to be logged into the same terminal at the same time. That means you can, for instance, exchange or modify scripts with a pal via a text editor, as long as you've both paged through to the same window. To do this, though, your pal will need to log into your computer as you, so don't try this unless you're sure you don't mind sharing your private login and password. (You can always change them later.)

Advertisement

There's also an excellent tutorial on GNU Screen by Jonathan McPherson at Kuro5hin, which explains how GNU Screen works under the covers and walks you through more commands. Just remember, it's not the blue screen of death—it's the GNU Screen of life!