Using the Screen or tmux Commands

Article ID: 709
Last updated: 25 Mar, 2026

Screen and tmux are terminal multiplexers available on all of the front-end systems within the NAS enclave (PFEs, AFEs, CFEs, CGHFEs, or LFEs). These utilities allow you to have persistent sessions on a these systems that can be used to reestablish access if your connection is interrupted. For example, if you begin a tmux session on a front-end system, then shut down your local workstation, then when you boot your workstation back up, you can ssh back to the front-end system your tmux session is on and reconnect to it, and it will be in the same state as before.

TIP: SSH connections to the enclave front ends are disconnected after 15 minutes of inactivity. We encourage you to use Screen or tmux to mitigate any impact to your work.

Functionally both Screen and tmux are similar, so you can use either depending on your workflow and preference.

Where is the Screen and tmux Software?

Both screen and tmux are installed on all the NAS front-end systems under /usr/bin. You do not need any additional software on your local system.

Steps to Begin a Screen or tmux Session

Once you ssh into a front-end and have a shell open, you can launch either Screen or tmux with the following commands, respectively:

$screen
$tmux

This will create a new Screen or tmux session that you can use as a regular ssh session, which will also allow you to create additional windows inside the session in lieu of creating additional ssh sessions if you so desire.

You should take note of the host name of the front end you are running Screen or tmux on, since to re-attach to the session in case of a disconnect, you will need to ssh to the same host.

Launching tmux

your_local_system% ssh pfe.nas.nasa.gov
pfe25% tmux

Re-attaching to tmux After Dropping the ssh Session

your_local_system% ssh pfe25.nas.nasa.gov
pfe25% tmux a

So long as the front-end system isn’t rebooted or you end your Screen or tmux session, you may end your ssh session whenever you would like, and you will be able to ssh back to the same front end and re-attach to your Screen or tmux session and return to the exact same point. Once the session is started, or attached to, then it can be used as a normal ssh session.

The reattach commands are:

$screen -r
$tmux a

Some useful commands are:

Usage Screen tmux
Create a Session screen (-s name if you’d like to name it) tmux (new-session -s name if you’d like to name it)
Attach to a Session screen -r (name if you created the session with one) tmux a (-t name if you created the session with one)
List sessions, if you have multiple screen -ls tmux ls

While inside the session:

Usage Screen tmux
Detach from a session Ctrl+a d Ctrl+b d
Create a new window Ctrl+a c Ctrl+b c
Switch to the next window Ctrl+a n Ctrl+b n
Switch to the previous window Ctrl+a p Ctrl+b p
List windows Ctrl+a “ Ctrl+b w
Switch to specific window Ctrl+a number Ctrl+b number

Additional Information

More in-depth information can be found in the man pages for Screen and tmux:

$man screen
$man tmux

Additionally, see the Screen or tmux documentation for detailed guidance.

Contact Us

General User Assistance

Security

  • Report security issues 24x7x365
  • Toll-free: 1-877-NASA-SEC (1-877-627-2732)
  • E-mail: soc@nasa.gov

User Documentation

High-End Computing Capability (HECC) Portfolio Office

NASA High-End Computing Program

Tell Us About It

Our goal is furnish all the information you need to efficiently and effectively use the HECC resources needed for your NASA computational projects.

We welcome your input on features and topics that you would like to see included on this website.

Please send us email with your wish list and other feedback.