Home   Partimus   Resources   Radio   IRC   Command_Line   VIM   Screen   FIT   AI   About  
 


Learning GNU Screen


I would like to help you learn how to use a GNU Screen or a newer rewrite of very similar type tmux. Screen is a software tool you don't know you need until after you need it. I hope the following links will help fill in the gaps between what you know and what you want to learn.

The main URL for this page is https://www.grantbow.com/screen.html. It was started in June 2019. Thank you to all the contributors who have helped me keep this page updated. Email is encouraged to Grant Bowman <grantbow@grantbow.com>

GNU Screen or tmux solve particular problems when using terminals. When getting started the most important part to remember is to start as soon as connecting so it is ready when you need it.

  • reconnecting: pick up your session where you left off without losing anything
  • multiplexing: start more than one command line terminal
  • scrolling: terminal sessions history without the need for a WYSIWYG scrollable window
  • copy and paste: always useful

There are only a few commands you need to get started. To use screen comfortably and visibly a few extra configuration items are helpful.

  • $ screen
    Nothing seems to happen! This is by design.
  • The "prefix key" by default is <Ctrl-a>.
    • c: create terminal
    • d: detatch session
    • [: scroll mode
  • $ screen -ls
    Used when reattaching to list existing screen sessions.
  • $ screen -R -D
    Used to reattach. If a session is running and thinks it's still attached detatch it first.
  • By default both screen and tmux are configured to show almost no status when running. A status line can be made visible. It can act similar to tabs in a windowed environment. Making the current status visible helps when working with multiple terminals.
  • Tmux uses the prefix key <Ctrl-b> by default. Changing it to <Ctrl-a> is recommended for consistency.

First Commands

Link Comments Updated
google: learn screen sites to learn more about screen 20190610
google: learn tmux sites to learn more about tmux 20190610

Next steps

Link Comments Updated
screen home page 20190610
tmux home page 20190610
tmux-copy-paste reminder how to use tmux copy buffer:
copy mode starts with C-[, mark with C-<space> and C-w, then paste with C-]!
20190718

Please email inquiries & suggestions to Grant Bowman <grantbow@grantbow.com>

Last update: 20190608