12 examples for tmux

{{ score }}
  # Creates a new tmux session named 'mysession'
tmux new -s mysession

# Lists the current sessions
tmux ls

# Attaches to an existing session
tmux attach -t mysession

# Kills a tmux session
tmux kill-session -t mysession
        
{{ score }}
  # remember that most things you want to do in tmux are not calling tmux from the cli
# but, rather, Control-b then some other keystroke while running the multipane tmux
C-b, c	#new window
C-b, [	#copy
C-b, =	#paste from recent
C-b, ]	#paste most recent
C-b, %	#split panes
C-b, w	#switch to another window
C-b, q	#switch to another pane
C-b, x	#kill this pane
C-b, :quit	#kill this pain
        
{{ score }}
  # more pane splitting
C-b, %  #split pane vertically
C-b, "  #split pane horizontally

# pane switching
C-b, o  #go to another/next pane
C-b, q  #print ids of panes, or jump to one by entering it's number, ie C-b, q2
        
{{ score }}
  # Attach to a running session, or create a new session if there isnt one
tmux attach || tmux
        
{{ score }}
  # Attach to a tmux session running on a remote host
ssh  -t tmux a
ssh  -t tmux attach -t 
        
{{ score }}
  # Show a big clock
C-b, t
        
{{ score }}
  # Show a list of all commands
C-b ?
# Jump between open sessions
C-b (
C-b )
        
{{ score }}
  # detach a session
tmux detach
        
{{ score }}
  # detach session
tmux detach
        
{{ score }}
  # starts a tmux session named my-session
tmux -S my-session
        
{{ score }}
  # attach to existing session called "serious"
tmux attach -t serious
        
{{ score }}
  # your_comment_here
To dettach a session
ctrl-b d
To reattach
tmux attach
if the session had a name
tmux a -t name

A

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
B
B
B
B
B
B
B
B
A
Detached sessions keep running whatever they are supposed to be running even if you disconnect! For exampl gem install bropages which takes forever on a rasoberrypi.