tmux 시작하기
Source: Dev.to
Introduction
tmux(터미널 멀티플렉서)에 대한 소개.
Session Management
Start tmux
tmux # or tmux new-sessionCreate a new session within a session
prefix + :newList sessions
tmux lsDetach from a session (exit tmux)
prefix + dAttach to a session
tmux attach # or tmux aAttach to a specific session
tmux attach -t 0 # or tmux a -tDelete a session
tmux kill-sessionDelete a specific session
tmux kill-session -t 0Delete all sessions
tmux kill-serverRename a session
prefix + $
Window Management
Create a new window
prefix + cSwitch to the next window
prefix + nSwitch to the previous window
prefix + pSwitch to a specific window
prefix + 0(replace 0 with the window number)List windows
prefix + wDelete a window
prefix + &
Pane Management
Delete a pane
prefix + xSwap panes (forward)
prefix + {Swap panes (backward)
prefix + }
Copy Mode
Enter copy mode
prefix + [Select copy range (in copy mode)
vorSpaceCopy (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