Friday, November 3, 2023

screen - tmux dictionary

The following lists equivalent commands I most commonly use for the screen and tmux programs.
This is relevant because Red Hat has stopped making screen easily available, first marking it as deprecated in v7.6, then not even including it after v8.0: https://access.redhat.com/solutions/4136481

1. List existing sessions:

  • screen -ls
  • tmux ls # tmux list-sessions
2. Create a new named session:
  • screen -S name
  • tmux new -s name # or: tmux new-session -s name
3. Attach a named session:
  • screen -dr name
  • tmux a -t name # or: tmux attach -t name
4. Detach an attached session:
  • Ctrl+a d # screen
  • Ctrl+b d # tmux
5. Enter copy mode:
  • Ctrl+a Esc # screen
  • Ctrl+b [   # tmux
6. Exit copy mode:
  • Esc # screen
  • q   # tmux
7. Terminate named session:
  • tmux kill-session -t name
  • screen -XS name
8. Start a command in a session:
  • screen -dmS session_name command param1 param2
  • tmux new -d -s name command param1 param2

No comments: