Here's a quick reference for Tmux, covering sessions, panes, and windows along with the command you mentioned.
- Start a new session:
tmux new -s <session_name>
- Attach to an existing session:
tmux attach -t <session_name>
- List all sessions:
tmux ls
- Kill a session:
tmux kill-session -t <session_name>
- Create a new session (or attach if it exists):
tmux new -s mike -A
- Create a new window:
or from within Tmux:
tmux new-window
Ctrl+b c
- Switch between windows:
- Next window:
Ctrl+b n
- Previous window:
Ctrl+b p
- Directly by number:
Ctrl+b <number>
- Next window:
- Rename a window:
Ctrl+b , # then type the new name
- Kill the current window:
tmux kill-window
- Split pane horizontally:
Ctrl+b "
- Split pane vertically:
Ctrl+b %
- Switch between panes:
- Next pane:
Ctrl+b o
- Manually:
Ctrl+b <arrow_key>
- Next pane:
- Resize a pane:
Hold
Ctrl+b
, then press:
and typeresize-pane -D
,resize-pane -U
,resize-pane -L
, orresize-pane -R
for resizing. - Break a pane into a new window:
Ctrl+b ! # Detach the current pane into a new window
- Close the current pane:
or within the pane:
Ctrl+d
exit
- List windows:
Ctrl+b w # Shows a list of windows in the session
- Kill a specific window:
tmux kill-window -t <window_number_or_name>
- Detach from the session:
Ctrl+b d
- Attach to a session after detaching:
tmux attach -t <session_name>
This should cover your most commonly used commands in Tmux, including tmux new -s mike -A
for session handling and splitting/controlling windows and panes. Let me know if you need more details!