Screen Cheatsheet

GNU Screen commands for session management and terminal separation

Terminal Multiplexer6 commandsbeginner

Overview

Screen is a terminal multiplexer that allows multiple shells in one terminal.

Why It Matters

Screen provides terminal multiplexing and session persistence for long-running tasks.

Essential Commands

screen -S build

Start named screen session

screen -ls

List available screen sessions

screen -r build

Reattach to named session

screen -X -S build quit

Terminate specific session

screen -d -r build

Detach others and reattach session

screen -S build -X stuff "npm run dev "

Send command to running session

Quick Start

Start with the create detachable sessions

Key Concepts

Create detachable sessions

Manage multiple windows

Share sessions with other users

Pro Tips

  • Combine multiple commands for powerful workflows
  • Use aliases to speed up your command entry
  • Create scripts to automate repetitive tasks

Common Pitfalls to Avoid

  • Forgetting to check the documentation for edge cases
  • Running commands without understanding their full impact
  • Not testing changes in a safe environment first

Related Resources

9 items