screen — Simple Persistent Terminal Sessions¶
Problem¶
Same problem as tmux: SSH sessions die, jobs get killed, long-running tasks need to survive disconnects. screen is the older, simpler alternative to tmux — universally available and gets the job done with minimal setup.
Solution¶
screen creates detachable terminal sessions. It's installed by default on many systems, making it useful when tmux isn't available.
Installation (Fedora)¶
Core Workflow¶
# Start a named session
screen -S mysession
# Detach (keeps running)
Ctrl+a, d
# List sessions
screen -list
# Reattach
screen -r mysession
# If session shows as "Attached" (stuck)
screen -d -r mysession
Start a Background Job Directly¶
-d— start detached-m— create new session even if already inside screen-S— name the session
Capture Current Output Without Attaching¶
Send a Command to a Running Session¶
screen vs tmux¶
| Feature | screen | tmux |
|---|---|---|
| Availability | Installed by default on most systems | Usually needs installing |
| Split panes | Basic (Ctrl+a, S) | Better (Ctrl+b, ") |
| Scripting | Limited | More capable |
| Config complexity | Simple | More options |
Use screen when it's already there or for quick throwaway sessions. Use tmux for anything more complex. See tmux.