Jan 15, 2014

Tips on GNU Screen

GNU Screen is a simple but powerful terminal multiplexer.

Two basic commands that I use often:
  • screen -r : Re-attach the only-one screen session.
  • screen -ls : To show running sessions 

Here's the features that I use often:
  • ctrl-a + d : To detach the terminal.
  • ctrl-a + c : To create a new terminal
  • ctrl-a + p : To switch to the previous terminal
  • ctrl-a + n : To switch to the next terminal
Here's the features that I use less often:
  • ctrl-a + x : To lock the current terminal
  • ctrl-a + S : To split the terminal to two separate areas/tabs.
  • ctrl-a + X : To close the current area/tab.
  • ctrl-a + [tab] : To switch to the next tab.
  • ctrl-a + H : To create a running log of the session.
Advanced usages:
  • ctrl-a + M : To start/stop monitor for activity
  • ctrl-a + _ : To start/stop monitor for silence 
  • ctrl-a + " : To quickly go to that window
References:
  • http://polishlinux.org/howtos/screen-tips-tricks/
  • http://www.softpanorama.org/Utilities/screen.shtml
  • https://wiki.archlinux.org/index.php/GNU_Screen
  • http://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/
Tips:
In you accidentally press "ctrl-a s" (instead of "ctrl-a S") while creating tab, which freeze the parent terminal, just press "ctrl-a q" to unfreeze it.