Upterm

Instant Terminal Sharing

View project on GitHub

upterm attach

Attach this terminal to a running session

Synopsis

Attach this terminal to a running session, by name.

The session keeps running when this terminal detaches, and any number of terminals can attach to it over time. With no NAME, the one running session is attached to; with several, the name is required.

To detach, type the escape character at the start of a line followed by a period: ~. by default. ~~ sends a literal ~. On Unix, ~^Z suspends this terminal instead — fg resumes it. A session that keeps producing output while this terminal is suspended may disconnect it before fg runs (the same 254 below); ‘upterm attach NAME’ brings it back. Everything else is sent to the session as typed. A SIGTERM or SIGHUP detaches too.

Exit status: 0 after a detach; the session’s reported exit status once it ends (0 when –join-timeout expires); 254 if the session disconnected this terminal (a stalled or overflowed terminal, or a daemon that went away — see the log for which); 255 if it could not attach.

upterm attach [NAME] [flags]

Examples

  # Attach to the session named build-shell:
  upterm attach build-shell

  # Attach with no escape character, so every keystroke reaches the session:
  upterm attach build-shell --escape-char none

Options

      --escape-char string   Escape character for detaching (ESC-CHAR followed by . at the start of a line) or suspending (ESC-CHAR followed by ^Z, Unix only), or 'none' to disable. (default "~")
  -h, --help                 help for attach

Options inherited from parent commands

      --debug   enable debug level logging (log file: /home/user/.local/state/upterm/upterm.log).

SEE ALSO

  • upterm - Instant Terminal Sharing
Auto generated by spf13/cobra on 25-Sep-2026