tmux 시작하기
Source: Dev.to
Introduction
tmux(터미널 멀티플렉서)에 대한 소개.
Session Management
-
Start tmux
tmux # or tmux new-session -
Create a new session within a session
prefix + :new -
List sessions
tmux ls -
Detach from a session (exit tmux)
prefix + d -
Attach to a session
tmux attach # or tmux a -
Attach to a specific session
tmux attach -t 0 # or tmux a -t -
Delete a session
tmux kill-session -
Delete a specific session
tmux kill-session -t 0 -
Delete all sessions
tmux kill-server -
Rename a session
prefix + $
Window Management
-
Create a new window
prefix + c -
Switch to the next window
prefix + n -
Switch to the previous window
prefix + p -
Switch to a specific window
prefix + 0(replace 0 with the window number) -
List windows
prefix + w -
Delete a window
prefix + &
Pane Management
-
Delete a pane
prefix + x -
Swap panes (forward)
prefix + { -
Swap panes (backward)
prefix + }
Copy Mode
-
Enter copy mode
prefix + [ -
Select copy range (in copy mode)
vorSpace -
Copy (in copy mode)
yorEnter
macOS Terminal Note
macOS Terminal에서 tmux를 사용할 때는 tmux가 vim‑like 단축키를 사용하기 때문에 마우스로 텍스트를 선택해도(⌘+C) 복사할 수 없습니다. 마우스로 선택한 영역을 복사하려면 Terminal의 Allow mouse reporting 설정을 ⌘+R 로 토글하세요.
Configuration
이 글에서는 tmux 설정 저장소를 참고합니다:
github - bmf-san/dotfiles