Temrinal Multiplexer
Screen
Section titled “Screen”GNU Screen allows you to manage multiple terminal sessions within a single window and keeps processes running even if your connection drops, making it useful running remote jobs.
Options
Section titled “Options”screen -S [name] # Start new named sessionscreen -ls # List sessionsscreen -r [name] # Reattach to sessionscreen -d -r # Detach existing and reattach hereShortcut keys
Section titled “Shortcut keys”Ctrl-a + c # Create new windowCtrl-a + " # List/select windowsCtrl-a + n/p # Next/previous windowCtrl-a + d # Detach sessionCtrl-a + k # Kill windowCtrl-a + S # Split horizontalCtrl-a + | # Split verticalCtrl-a + <TAB> # Switch split regionsCtrl-a + X # Close active splitShortcut keys
Section titled “Shortcut keys”Ctrl-a + c # Create a new window.Ctrl-a + " # Window selectorCtrl-a + w # Displays the list of all the windows currently opened.Ctrl-a + A # Renames the current windows. The name will appear when you will list the list of windows opened with Ctrl-a + w.Ctrl-a + n # Go to the next windows.Ctrl-a + p # Go to the previous windows.Ctrl-a + Ctrl-a # Go back to the last windows used.Ctrl-a + k # Close the current windows (kill).Ctrl-a + S # Split the current windows horizontally. To switch between the windows, do Ctrl-a + <TAB>.Ctrl-a + | # Split the current windows vertically.Ctrl-a + X # Close active Split windowCtrl-a + Q # Close all Split windowsCtrl-a + d # Detach a screen session without stopping it.Ctrl-a + r # Reattach a detached screen session.Ctrl-a + <ESC> # Start the copy mode.All screen command flags and shortcuts
-a # Force all capabilities into each window’s termcap.
-A -[r|R] # Adapt all windows to the new display width & height.
-c [file] # Read configuration file instead of ‘.screenrc’.
-d (-r) # Detach the elsewhere running screen (and reattach here).
-dmS [name] # Start as daemon: Screen session in detached mode.
-D (-r) # Detach and logout remote (and reattach here).
-h [lines] # Set the size of the scrollback history buffer.
-i # Interrupt output sooner when flow control is on.
-l # Make the login mode on (update /var/run/utmp), -ln = off.
-ls [match] # Display all the attached screens.
-L # Turn on output logging.
-m # Ignore $STY variable, do create a new screen session.
-O # Choose optimal output rather than exact vt100 emulation.
-p [window] # Preselect the named window if it exists.
-q # Quiet startup. Exits with non-zero return code if unsuccessful.
-Q # Commands will send the response to the stdout of the querying process.
-r [session] # Reattach to a detached screen process.
-R # Reattach if possible, otherwise start a new session.
-S [sockname] # Name this session .sockname instead of …
-t [title] # Set title. (window’s name).
-T [term] # Use term as $TERM for windows, rather than “screen”.
-U # Tell screen to use UTF-8 encoding.
-v # Print Screen version.
-x # Attach to a not detached screen. (Multi display mode).
-X # Execute as a screen command in the specified session.