Files
MajorWiki/03-opensource/dev-tools/screen.md
MajorLinux 4f3e5877ae wiki: add dev-tools section with tmux, screen, and rsync articles
Add three new articles to 03-opensource/dev-tools/:
- tmux: persistent terminal sessions, background jobs, capture-pane
- screen: lightweight alternative, comparison table
- rsync: flags reference, resumable transfers, SSH usage

Update all indexes (SUMMARY, section index, main index, README).
Article count: 28 → 31. Remove tmux from writing backlog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 23:33:38 -04:00

1.7 KiB

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)

sudo dnf install screen

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

screen -dmS mysession bash -c "long-running-command 2>&1 | tee /root/output.log"
  • -d — start detached
  • -m — create new session even if already inside screen
  • -S — name the session

Capture Current Output Without Attaching

screen -S mysession -X hardcopy /tmp/screen_output.txt
cat /tmp/screen_output.txt

Send a Command to a Running Session

screen -S mysession -X stuff "tail -f /root/output.log\n"

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.


Tags

#screen #terminal #linux #ssh #productivity #dev-tools