
Screen is a
window manager for console based environment. Its killer feature is the ability to detach the current session and resume it (reattach) it at will at arbitrary time. Another useful feature is that it multiplexes the multiple windows in a single one, this used to be way more important before the
GUI terminals such as
gnome-terminal,
mrxvt,
konsole.. become popular. Now you can simply do that by opening a new tab. Another thing which it can be used to to have two (or more) people attach the same screen so one can guide the others (-x does this).
alias sl='screen -ls'
alias sr='screen -D -R'
This are two rather handy aliases, especially the second one, it allows you to do "sr im" and create the screen session named "im" if it doesn't exist, but only detaching it and attaching it if it does exist. This is better than screen -x because if you reattach from a machine with different resolution screen -x will leave the old settings, while -D -R will properly handle the resizing.
Ever left some longer running script/process/something at home and than wished you could control it via
ssh? Fear not, retty is here to rescue! To demonstrate this:
$ irssi
# switch to new tab
$ screen -S irssi
$ retty `pgrep irssi`
/redraw
To explain what is going on here, first we start a normal application in one tab, this could be any other thing, like a script doing heavyweight processing. In the new tab we start the screen session, this is an optional step, it allows us to be able to later on detach/reattach the session at will. Inside the screen session we hijack the irssi PID. The last step, /redraw is only necessary because we are dealing with complex
ncurses stuff which does weird stuff when it's in operation :). For the same reason you have to run "reset" in the first tab if you want to keep using it normally. This by itself isn't really useful, however you can use the exact same procedure to reattach something via ssh.

This is probably the feature i use most in screen, apart of the attaching/detaching sessions obviously. The ability to name particular window, it makes it so much easier to pick the window you want/need. Also after reattaching a session after a day of inactivity you don't have to cycle through windows to see what is there. To name a window use "^a A".