内容纲要

[code]
pacman -S tmux
[/code]

SHOW SESSIONS
[code]
$ Ctrl-b s
$ tmux ls
[/code]

CREATE A NEW SESSION
[code language=”bash”]
$ tmux new -s session-name
# without naming the new session
$ tmux new
[/code]

ATTACHING TO AN EXISTING
[code language=”bash”]
# connect you to the first available session
$ tmux a
# attach to a specific session by providing an argument
$ tmux a -t session-name
[/code]

DETACHING FROM A SESSION
[code language=”bash”]
$ tmux detach
# or
$ Ctrl-b d
[/code]

KILLING A SESSION

[code language=”bash”]
$ tmux kill-session -t session-name
# 杀死窗口
$ tmux kill-window -t window-name

[/code]

[code]
# session management
tmux ls (or tmux list-sessions)
tmux new -s session-name
Ctrl-b d Detach from session
tmux attach -t [session name]
tmux kill-session -t session-name

Ctrl-b c Create new window
Ctrl-b d Detach current client
Ctrl-b l Move to previously selected window
Ctrl-b n Move to the next window
Ctrl-b p Move to the previous window
Ctrl-b & Kill the current window
Ctrl-b , Rename the current window
Ctrl-b q Show pane numbers (used to switch between panes)
Ctrl-b o Switch to the next pane
Ctrl-b ? List all keybindings

# moving between windows
Ctrl-b n (Move to the next window)
Ctrl-b p (Move to the previous window)
Ctrl-b l (Move to the previously selected window)
Ctrl-b w (List all windows / window numbers)
Ctrl-b window number (Move to the specified window number, the
default bindings are from 0 — 9)

# Tiling commands
Ctrl-b % (Split the window vertically)
CTRL-b " (Split window horizontally)
Ctrl-b o (Goto next pane)
Ctrl-b q (Show pane numbers, when the numbers show up type the key to go to that pane)
Ctrl-b { (Move the current pane left)
Ctrl-b } (Move the current pane right)

# Make a pane its own window
Ctrl-b : "break-pane"

# add to ~/.tmux.conf
bind | split-window -h
bind – split-window -v

[/code]

发表评论

电子邮件地址不会被公开。 必填项已用*标注