screen command
Keep terminal sessions running and reattach to them later.
- Shell & scheduling
- Package screen
- 6 options · 6 examples
Syntax
screen [options]Provided by the screen package. Run man screen for the full manual.
Common options
| Option | What it does |
|---|---|
-S NAME | Start a named session |
-ls | List sessions |
-r NAME | Reattach to a session |
-d -r | Detach elsewhere and reattach here |
-dmS NAME CMD | Start a detached session running CMD |
Ctrl+A D | Detach (inside screen) |
Examples
Start a named session
screen -S deployList sessions
screen -lsReattach
screen -r deployRun a command detached
screen -dmS backup ./backup.shtmux equivalent: new session
tmux new -s deploytmux: reattach
tmux attach -t deploy
No example matches. Check the options table or search the guides.
screen guides
- Getting Started with Linux Screen Command: A Beginner’s Guide Linux Commands · Updated Apr 2025
- 10 Best Linux Screen Recording Tools in 2022 Linux · Updated Apr 2025
