/
Screen and Tmux Commands

Screen and Tmux Commands

Overview

The Linux tmux and GNU screen commands are terminal multiplexers – in brief, these commands let a user launch and use multiple shell sessions from a single ssh session.
The screen or tmux commands also allow a user to start a process in a terminal, disconnect from that terminal, and then reconnect without having to restart the process. This is very useful as your tmux/screen session will remain active even if you lose your network connection.

Both of these programs are available on Teton. At the command prompt, simply type screen or tmux and hit enter.

Shortcuts:

While in a terminal window, press Ctrl-a (for screen) or Ctrl-b (for tmux) to access these shortcuts. The screen variants are presented here.

  • Ctrl-a + c: creates a new screen

  • Ctrl-a + N: (where N is equal to the number of the screen) this key command switch us to a specific screen

  • Ctrl-a + a: switches us to the next screen

  • Ctrl-a + w: view a list of screens. The unique ID of each screen, along with its name, and running process is displayed, for each individual window. The current window will be marked with an asterisk (*).

  • Ctrl-a + “: allows us to view the screen picker

  • Ctrl-a + ? - shows the shortcut key options

  • Ctrl-a + p and Ctrl-a + n: used to switch to the next or previous window.

  • Ctrl-a + k: will kill the current window session.

  • Ctrl-a + d: to detach the current screen session.

  • Ctrl-a + r: to reattach a detached screen session.

Related content

Tmux Cheat Sheet
Tmux Cheat Sheet
More like this
Beartooth Hardware Summary Table
Beartooth Hardware Summary Table
Read with this
The Command Line Interface
The Command Line Interface
More like this
Resources and Services
Resources and Services
Read with this
SSH
More like this
Windows - Logging into HPC with ssh
Windows - Logging into HPC with ssh
More like this