Note: ^ is used to denote the "screen command character." If you use the .screenrc below then the command character is `, otherwise it is Ctrl+a.

screenrc ^

escape `` # Change escape to `

hardstatus alwayslastline

hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
# I'll do without the time. Thank you very much.
#hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%<'

Command Line ^

From the command line screen will start, and put you in, a new screen session. You can detach with ^d. screen -ls will show your screens and their status'. screen -r will re-attach you to the screen you just closed. screen -S coolname will create a screen called "coolname". This is handy if you have many screen sessions. You can then re-attach to this particular one by doing screen -r coolname.

screen -d will detach a screen elsewhere (good for when you left work but forgot to detach your screen). Add -r to then attach to that screen.

Screen Commands ^

Gotchas ^

^s is the same as sending a ctrl s to the window. Which stops output to the screen. It will appear that the window has frozen. To resume output you need to send a ctrl q to the window which is accomplished by ^q.

The reason for this is one of the side effects of how screen works. Input is sent to the terminal, then to screen, then screen sends it to the window. Typing ctrl s in screen will cause output to stop to the entire terminal; You won't see the time change (if you've enabled that in .screenrc), if something is outputting like a tailed log you won't see it, you won't even see windows change if you cycle through them or resize them. Though it's still happening the output to your terminal has been supressed. When you send a ^s screen intercepts it and sends a ctrl s to the window itself. Now just output to that window has stopped; time will still move, you can still change and do things in other windows and you can still detach from your screen session. ^q will tell screen to send the ctrl q signal to that window and resume output.