Screen Utility (and my .screenrc)
Screen is a fantastic utility which is best described as a terminal multiplexer. It comes standard in most modern Unix-based operating systems (e.g. Linux, MacOS X, BSD). Simply stated it is one of the most useful utilities I have discovered and is a powerful tool in the hands of a console warrior.
In a nutshell: you can run any number of console-based applications within a single terminal. I usually fire up one terminal and then ssh to various hosts. But one of the best features is the ability to decouple the terminal emulator from the running programs. This means you can log out or loose your session accidentally and you can come right back to where you are.
This if fantastic for embedded development. I ssh to a workstation (Linux) attached to the embedded console over a USB serial port. This is running 24 hours a day monitoring the embedded system. I ssh to the workstation and use screen to reattach to the running serial console. I wrote about this HERE.
Basic screen commands
Control-A Control-C will create a new session/shell.
Control-A Control-n (where n is the session number, 0-n) will switch you to that shell.
Control-A Control-D will detach.
My .screenrc
The only draw back is that the standard .screenrc configuration file is blank which leaves you with no visual indication of whether or not screen is running.
Here is the contents of my ~/.screenrc file which will setup a caption at the bottom of the terminal session which will tell you the host, time, and other session information.
1: termcapinfo xterm|xterms|xs|rxvt ti@:te@
2: caption always "%H %c | %x-w%{=}%n-%t%{-}w"
3: shell -/bin/bash