cmdxray / commands / screen

What does screen do?

terminal multiplexer — detachable sessions that survive logout.

▸ Explain your own screen command →

screen examples, explained

$ screen -S work

  • screenterminal multiplexer — detachable sessions that survive logout
  • -Sname the new session
  • workvalue for -S

$ screen -r

  • screenterminal multiplexer — detachable sessions that survive logout
  • -rreattach to a detached session

$ screen -dm long-job.sh

  • screenterminal multiplexer — detachable sessions that survive logout
  • -ddetach a session (with -r, detach elsewhere then reattach)
  • -mforce a new session even when one exists (with -d = detached)
  • long-job.shan argument passed to the command

screen flags & options

-Sname the new session
-rreattach to a detached session
-Rreattach if possible, otherwise start a new session
-ddetach a session (with -r, detach elsewhere then reattach)
-Ddetach and log out the remote session, then reattach
-xattach to a session that is not detached (multi-attach)
-mforce a new session even when one exists (with -d = detached)

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.