Split View: Tmux 명령어 완벽 가이드: 터미널 멀티플렉서로 생산성을 10배 높이는 모든 명령어 총정리
Tmux 명령어 완벽 가이드: 터미널 멀티플렉서로 생산성을 10배 높이는 모든 명령어 총정리
- 1. Tmux 소개
- 2. 설치 및 기본 개념
- 3. 세션(Session) 관리
- 4. 윈도우(Window) 관리
- 5. 페인(Pane) 관리
- 6. 복사 모드 (Copy Mode)
- 7. 키바인딩 커스터마이징
- 8. .tmux.conf 설정 가이드
- 9. 플러그인
- 10. 고급 기능
- 11. 실전 활용 시나리오
- 12. Tmux vs Screen vs Zellij 비교
- 13. 실전 치트시트: 자주 쓰는 명령어 40선
- 14. 트러블슈팅
- 15. 마무리: Tmux 학습 로드맵
1. Tmux 소개
1.1 터미널 멀티플렉서란?
**터미널 멀티플렉서(Terminal Multiplexer)**란 하나의 터미널 화면 안에서 여러 개의 가상 터미널 세션을 생성하고, 분할하고, 전환할 수 있게 해주는 도구다. 물리적으로 모니터가 하나뿐이더라도 수십 개의 터미널을 동시에 운영하고, 필요에 따라 즉시 전환하거나 백그라운드에서 유지할 수 있다.
Tmux(Terminal Multiplexer)는 이 범주에서 가장 널리 사용되는 현대적인 도구로, BSD 라이선스 하에 오픈소스로 개발되고 있다.
Tmux가 해결하는 핵심 문제는 다음과 같다.
- SSH 연결 끊김 시 작업 유실 방지: 세션이 서버에 유지되므로 재접속 후 그대로 복귀
- 화면 분할: 한 화면에서 코드 편집, 서버 로그, 테스트 실행을 동시 확인
- 작업 컨텍스트 전환: 프로젝트별로 세션을 분리하여 즉시 전환
- 페어 프로그래밍: 같은 세션에 여러 사용자가 동시 접속하여 협업
1.2 GNU Screen vs Tmux 비교
Tmux 이전에 GNU Screen이 터미널 멀티플렉서의 대표 도구였다. 두 도구의 주요 차이점을 비교한다.
| 항목 | GNU Screen | Tmux |
|---|---|---|
| 최초 릴리스 | 1987년 | 2007년 |
| 아키텍처 | 단일 프로세스 | 클라이언트-서버 모델 |
| 화면 분할 | 수평 분할만 기본 지원 | 수평/수직 분할 모두 기본 지원 |
| 스크립팅 | 제한적 | 강력한 명령어 체계 |
| 상태바 | 기본 없음, 수동 설정 | 기본 제공, 고도로 커스터마이징 가능 |
| 복사 모드 | 기본 모드 | Vi/Emacs 키바인딩 선택 가능 |
| 플러그인 생태계 | 거의 없음 | TPM 기반 활발한 생태계 |
| 유지보수 | 느린 업데이트 | 활발한 개발 |
| 라이선스 | GPL | BSD |
결론적으로, 신규 프로젝트에서는 Tmux를 선택하는 것이 압도적으로 유리하다. 스크립팅, 플러그인, 커뮤니티 지원 모든 면에서 Tmux가 앞선다.
1.3 사용 시나리오
Tmux가 빛을 발하는 대표적인 시나리오는 다음과 같다.
- SSH 원격 서버 작업: 네트워크 불안정 환경에서도 세션이 유지된다
- 개발 환경 구성: 에디터 + 서버 + 로그 + 테스트를 한 화면에 배치
- 서버 모니터링: htop, 로그 tail, 네트워크 모니터링을 동시 확인
- 장시간 실행 작업: 빌드, 데이터 마이그레이션 등을 detach하고 퇴근
- 페어 프로그래밍: 동일 세션에 여러 개발자가 접속하여 실시간 협업
- CI/CD 디버깅: 파이프라인의 각 단계를 별도 페인에서 모니터링
2. 설치 및 기본 개념
2.1 설치
운영체제별 설치 방법은 다음과 같다.
# Ubuntu / Debian
sudo apt update && sudo apt install -y tmux
# CentOS / RHEL / Rocky Linux
sudo yum install -y tmux
# 또는
sudo dnf install -y tmux
# macOS (Homebrew)
brew install tmux
# Arch Linux
sudo pacman -S tmux
# 소스 빌드 (최신 버전이 필요한 경우)
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make
sudo make install
설치 확인:
tmux -V
# tmux 3.5a
2.2 핵심 계층 구조: Session > Window > Pane
Tmux의 아키텍처를 이해하려면 세 가지 계층을 반드시 파악해야 한다.
Tmux Server (백그라운드 프로세스)
└── Session (세션: 논리적 작업 단위)
├── Window 0 (윈도우: 탭과 유사)
│ ├── Pane 0 (페인: 분할된 영역)
│ ├── Pane 1
│ └── Pane 2
├── Window 1
│ ├── Pane 0
│ └── Pane 1
└── Window 2
└── Pane 0
| 개념 | 설명 | 비유 |
|---|---|---|
| Server | Tmux 프로세스. 모든 세션을 관리한다 | 운영체제 |
| Session | 독립적인 작업 공간. 여러 Window를 포함한다 | 바탕화면/워크스페이스 |
| Window | 세션 내의 전체 화면. 탭처럼 전환 가능하다 | 브라우저 탭 |
| Pane | 윈도우를 분할한 개별 터미널 영역 | 화면 분할 |
2.3 Prefix Key 개념
Tmux는 모든 키바인딩에 Prefix Key를 사용한다. 기본값은 Ctrl-b다.
작동 방식:
Ctrl-b를 누른다 (동시에 누른 후 손을 뗀다)- 이어서 원하는 명령 키를 누른다
예를 들어 새 윈도우를 만들려면:
Ctrl-b입력c입력
이 문서에서는 이후 Prefix Key를 <prefix>로 표기한다. 즉 <prefix> c는 Ctrl-b를 누른 후 c를 누르는 것을 의미한다.
Tip:
Ctrl-b가 손에 불편하다면.tmux.conf에서Ctrl-a(Screen 스타일)나Ctrl-Space등으로 변경할 수 있다. 이는 7장에서 다룬다.
3. 세션(Session) 관리
세션은 Tmux의 최상위 작업 단위다. 프로젝트별, 목적별로 세션을 분리하여 작업 컨텍스트를 관리한다.
3.1 세션 생성
# 기본 세션 생성 (이름 자동 지정: 0, 1, 2, ...)
tmux
# 이름을 지정하여 세션 생성
tmux new -s dev
# 이름을 지정하고 특정 디렉토리에서 시작
tmux new -s project -c ~/workspace/my-project
# 세션 생성 후 바로 명령어 실행
tmux new -s monitoring 'htop'
# 세션 생성하되 attach하지 않음 (백그라운드)
tmux new -s background -d
# 윈도우 이름까지 지정하여 생성
tmux new -s dev -n editor
3.2 세션 목록 확인
# 세션 목록 조회
tmux ls
# 또는
tmux list-sessions
# 출력 예시:
# dev: 3 windows (created Mon Mar 1 10:00:00 2026)
# monitoring: 1 windows (created Mon Mar 1 10:05:00 2026)
# background: 2 windows (created Mon Mar 1 10:10:00 2026) (attached)
Tmux 내부에서도 세션 목록을 확인할 수 있다.
<prefix> s # 세션 목록을 인터랙티브하게 보여준다
3.3 세션 접속 (Attach)
# 마지막으로 사용한 세션에 attach
tmux attach
# 또는
tmux a
# 특정 세션에 attach
tmux attach -t dev
# 또는
tmux a -t dev
# 다른 클라이언트가 접속 중이어도 강제 attach (기존 클라이언트 detach)
tmux attach -dt dev
3.4 세션 분리 (Detach)
세션에서 분리하면 세션은 백그라운드에서 계속 실행된다.
<prefix> d # 현재 세션에서 detach
# 특정 클라이언트를 detach (외부에서)
tmux detach-client -t dev
3.5 세션 이름 변경
<prefix> $ # 현재 세션 이름 변경 (프롬프트가 나타남)
# 외부에서 세션 이름 변경
tmux rename-session -t old_name new_name
3.6 세션 전환
<prefix> s # 세션 목록에서 선택하여 전환
<prefix> ( # 이전 세션으로 전환
<prefix> ) # 다음 세션으로 전환
# 외부에서 특정 세션으로 전환 (이미 attach 상태일 때)
tmux switch-client -t monitoring
3.7 세션 종료
# 특정 세션 종료
tmux kill-session -t dev
# 현재 세션을 제외한 모든 세션 종료
tmux kill-session -a
# 특정 세션을 제외한 모든 세션 종료
tmux kill-session -a -t dev
# Tmux 서버 전체 종료 (모든 세션 종료)
tmux kill-server
세션 내부에서 종료하는 방법:
# 세션 내에서 exit 또는 Ctrl-d로 마지막 윈도우/페인을 닫으면 세션도 종료
exit
3.8 세션 관리 실전 패턴
# 세션이 존재하면 attach, 없으면 생성하는 패턴
tmux new -A -s dev
# 이것은 아래와 동일한 동작이다:
# tmux has-session -t dev 2>/dev/null && tmux attach -t dev || tmux new -s dev
4. 윈도우(Window) 관리
윈도우는 세션 내에서 탭처럼 동작하는 전체 화면 단위다. 하단 상태바에 윈도우 목록이 표시된다.
4.1 윈도우 생성
<prefix> c # 새 윈도우 생성
# 명령줄에서 윈도우 생성
tmux new-window
# 이름을 지정하여 윈도우 생성
tmux new-window -n logs
# 특정 디렉토리에서 윈도우 생성
tmux new-window -c ~/workspace/logs -n logs
# 특정 위치(인덱스)에 윈도우 생성
tmux new-window -t 3
4.2 윈도우 이름 변경
<prefix> , # 현재 윈도우 이름 변경 (프롬프트가 나타남)
# 명령줄에서 윈도우 이름 변경
tmux rename-window -t 0 editor
Tip: 쉘이 실행될 때마다 윈도우 이름이 자동으로 바뀌는 것을 방지하려면
.tmux.conf에 다음을 추가한다.
set-option -g allow-rename off
4.3 윈도우 전환
<prefix> 0~9 # 윈도우 번호로 직접 이동 (0번~9번)
<prefix> n # 다음(next) 윈도우로 이동
<prefix> p # 이전(previous) 윈도우로 이동
<prefix> l # 마지막으로 사용한 윈도우로 토글
<prefix> w # 윈도우 목록에서 인터랙티브하게 선택
<prefix> ' # 윈도우 인덱스를 입력하여 이동 (10번 이상일 때 유용)
<prefix> f # 윈도우 이름으로 검색하여 이동
4.4 윈도우 이동 및 정렬
# 윈도우 순서 변경 (현재 윈도우를 3번 위치로)
tmux move-window -t 3
# 윈도우를 다른 세션으로 이동
tmux move-window -t other_session:
# 윈도우를 다른 세션의 특정 위치로 이동
tmux move-window -t other_session:2
# 현재 윈도우와 특정 윈도우의 위치 교환
tmux swap-window -t 0
# 윈도우 번호 재정렬 (빈 번호 제거)
tmux move-window -r
4.5 윈도우 닫기
<prefix> & # 현재 윈도우 닫기 (확인 프롬프트 표시)
# 명령줄에서 특정 윈도우 닫기
tmux kill-window -t 2
# 현재 윈도우를 제외한 모든 윈도우 닫기
tmux kill-window -a
4.6 윈도우 목록 확인
# 모든 세션의 윈도우 목록
tmux list-windows -a
# 특정 세션의 윈도우 목록
tmux list-windows -t dev
5. 페인(Pane) 관리
페인은 윈도우를 분할하여 여러 터미널을 한 화면에 배치하는 기능이다. Tmux의 가장 강력하고 자주 사용하는 기능이다.
5.1 페인 분할
<prefix> % # 수직 분할 (좌우로 나눔, vertical split)
<prefix> " # 수평 분할 (상하로 나눔, horizontal split)
# 명령줄에서 페인 분할
tmux split-window # 수평 분할
tmux split-window -h # 수직 분할
# 특정 디렉토리에서 분할
tmux split-window -h -c ~/workspace
# 특정 크기로 분할 (전체의 30%)
tmux split-window -p 30
tmux split-window -h -p 40
# 특정 행/열 수로 분할
tmux split-window -l 10 # 10행 높이
tmux split-window -h -l 40 # 40열 너비
# 명령어를 실행하며 분할
tmux split-window 'tail -f /var/log/syslog'
5.2 페인 이동 (Navigation)
<prefix> 방향키(↑↓←→) # 방향키로 페인 이동
<prefix> o # 다음 페인으로 순환 이동
<prefix> ; # 마지막으로 활성화된 페인으로 토글
<prefix> q # 페인 번호 표시 (번호를 누르면 해당 페인으로 이동)
Tip: Vi 스타일 이동을 선호한다면
.tmux.conf에 다음을 추가한다.bind h select-pane -L # 왼쪽 페인 bind j select-pane -D # 아래쪽 페인 bind k select-pane -U # 위쪽 페인 bind l select-pane -R # 오른쪽 페인
5.3 페인 크기 조절
<prefix> Ctrl-방향키 # 1칸씩 크기 조절
<prefix> Alt-방향키 # 5칸씩 크기 조절
# 명령줄에서 크기 조절
tmux resize-pane -D 5 # 아래로 5칸 확장
tmux resize-pane -U 5 # 위로 5칸 확장
tmux resize-pane -L 10 # 왼쪽으로 10칸 확장
tmux resize-pane -R 10 # 오른쪽으로 10칸 확장
Tip: Vi 스타일 리사이즈 바인딩을 추가하면 편리하다.
bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5
-r플래그는 repeat를 의미하며, prefix 없이 연속으로 키를 눌러 반복 실행할 수 있다.
5.4 페인 줌 (Zoom)
특정 페인을 전체 화면으로 확대하거나 원래 크기로 복원한다.
<prefix> z # 현재 페인 줌 토글 (전체 화면 <-> 원래 크기)
줌 상태에서는 상태바의 윈도우 이름 옆에 Z가 표시된다. 로그를 자세히 보거나 코드를 집중적으로 편집할 때 매우 유용하다.
5.5 페인 위치 변경 및 교환
<prefix> { # 현재 페인을 이전 위치로 이동
<prefix> } # 현재 페인을 다음 위치로 이동
<prefix> Ctrl-o # 모든 페인을 시계 반대 방향으로 회전
<prefix> Alt-o # 모든 페인을 시계 방향으로 회전
# 특정 페인끼리 위치 교환
tmux swap-pane -s 0 -t 1
# 페인을 다른 윈도우로 이동 (join)
tmux join-pane -t :1 # 현재 페인을 윈도우 1로 이동
tmux join-pane -s :2 -t :1 # 윈도우 2의 페인을 윈도우 1로 이동
# 페인을 독립된 윈도우로 분리 (break)
<prefix> ! # 현재 페인을 새 윈도우로 분리
# 명령줄로 페인을 새 윈도우로 분리
tmux break-pane
tmux break-pane -t 1 # 1번 페인을 새 윈도우로
5.6 레이아웃 (Layout)
Tmux는 5가지 기본 레이아웃을 제공한다.
<prefix> Space # 다음 레이아웃으로 순환 전환
<prefix> Alt-1 # even-horizontal (모든 페인을 수평으로 균등 배치)
<prefix> Alt-2 # even-vertical (모든 페인을 수직으로 균등 배치)
<prefix> Alt-3 # main-horizontal (메인 페인 상단, 나머지 하단 분할)
<prefix> Alt-4 # main-vertical (메인 페인 좌측, 나머지 우측 분할)
<prefix> Alt-5 # tiled (타일 형태로 균등 배치)
각 레이아웃의 시각적 표현:
even-horizontal even-vertical
┌──────┬──────┬──────┐ ┌──────────────────┐
│ │ │ │ │ Pane 0 │
│ P0 │ P1 │ P2 │ ├──────────────────┤
│ │ │ │ │ Pane 1 │
│ │ │ │ ├──────────────────┤
└──────┴──────┴──────┘ │ Pane 2 │
└──────────────────┘
main-horizontal main-vertical
┌──────────────────┐ ┌──────────┬───────┐
│ Pane 0 │ │ │ P1 │
│ (main) │ │ Pane 0 ├───────┤
├────────┬─────────┤ │ (main) │ P2 │
│ P1 │ P2 │ │ ├───────┤
└────────┴─────────┘ │ │ P3 │
└──────────┴───────┘
tiled
┌─────────┬─────────┐
│ P0 │ P1 │
├─────────┼─────────┤
│ P2 │ P3 │
└─────────┴─────────┘
5.7 페인 닫기
<prefix> x # 현재 페인 닫기 (확인 프롬프트 표시)
# 명령줄에서 페인 닫기
tmux kill-pane
tmux kill-pane -t 2 # 2번 페인 닫기
# 현재 페인을 제외한 모든 페인 닫기
tmux kill-pane -a
또는 페인 내에서 exit를 입력하거나 Ctrl-d를 누르면 해당 페인이 닫힌다.
5.8 페인 표시/숨기기
# 페인을 마크 (표시)
<prefix> m # 현재 페인에 마크 토글
# 마크된 페인과 현재 페인 교환
tmux swap-pane
6. 복사 모드 (Copy Mode)
복사 모드는 터미널 출력 내용을 스크롤하고, 검색하고, 복사할 수 있는 모드다. Tmux의 숨겨진 강력한 기능 중 하나다.
6.1 복사 모드 진입 및 종료
<prefix> [ # 복사 모드 진입
q # 복사 모드 종료 (또는 Esc)
6.2 Vi vs Emacs 키바인딩
Tmux 복사 모드에서는 Vi 또는 Emacs 스타일의 키바인딩을 선택할 수 있다.
# .tmux.conf에서 Vi 모드 설정 (강력 추천)
setw -g mode-keys vi
Vi 모드에서의 주요 이동 키:
| 키 | 동작 |
|---|---|
h, j, k, l | 좌, 하, 상, 우 이동 |
w | 다음 단어로 이동 |
b | 이전 단어로 이동 |
0 | 줄의 시작으로 이동 |
$ | 줄의 끝으로 이동 |
g | 버퍼의 맨 위로 이동 |
G | 버퍼의 맨 아래로 이동 |
Ctrl-u | 반 페이지 위로 스크롤 |
Ctrl-d | 반 페이지 아래로 스크롤 |
Ctrl-b | 한 페이지 위로 스크롤 |
Ctrl-f | 한 페이지 아래로 스크롤 |
6.3 검색
복사 모드 내에서 텍스트를 검색할 수 있다.
/검색어 # 아래 방향으로 검색 (Vi 모드)
?검색어 # 위 방향으로 검색 (Vi 모드)
n # 다음 검색 결과로 이동
N # 이전 검색 결과로 이동
Emacs 모드에서는:
Ctrl-s # 아래 방향으로 증분 검색
Ctrl-r # 위 방향으로 증분 검색
6.4 텍스트 선택 및 복사
Vi 모드에서의 복사 흐름:
1. <prefix> [ # 복사 모드 진입
2. 이동 키로 시작점 이동
3. Space # 선택 시작
4. 이동 키로 끝점 이동
5. Enter # 선택 영역 복사 (tmux buffer에 저장)
# Vi 스타일로 복사/붙여넣기 바인딩 추가 (.tmux.conf)
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi r send-keys -X rectangle-toggle
위 설정을 적용하면:
| 키 | 동작 |
|---|---|
v | 텍스트 선택 시작 (Visual 모드) |
V | 줄 단위 선택 시작 |
r | 사각형(블록) 선택 토글 |
y | 선택 영역 복사 |
6.5 붙여넣기
<prefix> ] # tmux buffer의 내용을 붙여넣기
# 버퍼 목록 확인
tmux list-buffers
# 특정 버퍼 내용 확인
tmux show-buffer -b 0
# 버퍼를 파일로 저장
tmux save-buffer -b 0 ~/buffer.txt
# 파일 내용을 버퍼에 로드
tmux load-buffer ~/content.txt
# 버퍼 삭제
tmux delete-buffer -b 0
6.6 Scrollback Buffer 설정
기본 scrollback 크기는 2000줄이다. 더 많은 히스토리가 필요하면 늘릴 수 있다.
# .tmux.conf
set -g history-limit 50000
주의: scrollback buffer가 너무 크면 메모리 사용량이 증가한다. 50000줄 정도가 실용적인 상한선이다.
7. 키바인딩 커스터마이징
7.1 Prefix Key 변경
Ctrl-b가 불편하다면 다른 키로 변경할 수 있다.
# .tmux.conf - Ctrl-a로 변경 (GNU Screen 스타일)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Ctrl-Space로 변경 (추천)
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
Tip:
Ctrl-a로 변경하면 쉘에서 줄의 시작으로 이동하는 기본 단축키와 충돌한다. 이 경우Ctrl-a를 두 번 누르면 원래의Ctrl-a가 전달된다.
7.2 키 바인딩 추가 (bind-key)
# 기본 문법
bind-key [옵션] 키 명령어
# 축약형
bind 키 명령어
# Prefix 없이 바인딩 (-n 플래그)
bind -n M-Left select-pane -L # Alt-Left로 왼쪽 페인 이동
bind -n M-Right select-pane -R # Alt-Right로 오른쪽 페인 이동
bind -n M-Up select-pane -U # Alt-Up으로 위쪽 페인 이동
bind -n M-Down select-pane -D # Alt-Down으로 아래쪽 페인 이동
# 반복 가능한 바인딩 (-r 플래그)
bind -r h resize-pane -L 5
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
# 분할 시 현재 경로 유지
bind '"' split-window -v -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
7.3 키 바인딩 해제 (unbind-key)
# 특정 키 바인딩 해제
unbind-key C-b
# 축약형
unbind C-b
# 모든 키 바인딩 해제 (주의해서 사용)
unbind -a
7.4 현재 키 바인딩 확인
<prefix> ? # 모든 키 바인딩 목록 표시
# 명령줄에서 확인
tmux list-keys
tmux list-keys | grep split # 특정 명령어 필터링
7.5 편리한 커스텀 바인딩 예시
# 설정 파일 즉시 리로드
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
# 더 직관적인 분할 키
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# 윈도우 재정렬
bind R move-window -r \; display-message "Windows renumbered!"
# 동기화 모드 토글 (모든 페인에 동시 입력)
bind S setw synchronize-panes \; display-message "Sync #{?synchronize-panes,ON,OFF}"
# 세션 선택 단축키
bind C-s choose-session
# 팝업 윈도우로 lazygit 실행 (tmux 3.2+)
bind g display-popup -E -w 80% -h 80% "lazygit"
# 팝업 윈도우로 htop 실행
bind t display-popup -E -w 80% -h 80% "htop"
8. .tmux.conf 설정 가이드
~/.tmux.conf 파일은 Tmux 시작 시 자동으로 로드되는 설정 파일이다. 이 파일을 통해 Tmux의 거의 모든 동작을 커스터마이징할 수 있다.
8.1 기본 추천 설정
# ~/.tmux.conf
# ─────────────────────────────────────────────
# 기본 설정
# ─────────────────────────────────────────────
# Prefix를 Ctrl-a로 변경
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# 인덱스를 1부터 시작 (0번 키가 키보드 우측 끝에 있어 불편)
set -g base-index 1
setw -g pane-base-index 1
# 윈도우 닫을 때 번호 재정렬
set -g renumber-windows on
# 히스토리 크기
set -g history-limit 50000
# 이스케이프 시간 단축 (Vim 사용자를 위해)
set -sg escape-time 0
# 반복 키 입력 대기 시간
set -g repeat-time 600
# 포커스 이벤트 활성화 (Vim/Neovim 연동)
set -g focus-events on
# 설정 리로드
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
8.2 마우스 지원
# 마우스 지원 활성화 (tmux 2.1+)
set -g mouse on
# 마우스로 가능한 것들:
# - 페인 클릭으로 포커스 전환
# - 페인 경계 드래그로 크기 조절
# - 스크롤 휠로 히스토리 탐색
# - 텍스트 드래그로 복사 모드 진입 및 선택
Tip: 마우스를 활성화하면 기존 터미널의 텍스트 선택 기능이 Tmux에 의해 가로챌 수 있다. 시스템 클립보드로 직접 복사하려면
Shift를 누른 상태에서 마우스로 선택하면 된다.
8.3 Vi 모드 설정
# 복사 모드에서 Vi 키바인딩 사용
setw -g mode-keys vi
# Vi 스타일 복사
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi V send-keys -X select-line
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi r send-keys -X rectangle-toggle
bind -T copy-mode-vi Escape send-keys -X cancel
# 상태줄 명령어에서 Vi 모드
set -g status-keys vi
8.4 상태바 커스터마이징
# ─────────────────────────────────────────────
# 상태바 설정
# ─────────────────────────────────────────────
# 상태바 위치 (top 또는 bottom)
set -g status-position bottom
# 상태바 갱신 주기 (초)
set -g status-interval 5
# 상태바 색상
set -g status-style 'bg=#1e1e2e,fg=#cdd6f4'
# 좌측 상태바
set -g status-left-length 50
set -g status-left '#[fg=#1e1e2e,bg=#89b4fa,bold] #S #[fg=#89b4fa,bg=#1e1e2e] '
# 우측 상태바
set -g status-right-length 100
set -g status-right '#[fg=#585b70]│ #[fg=#cdd6f4]%Y-%m-%d #[fg=#585b70]│ #[fg=#cdd6f4]%H:%M #[fg=#89b4fa,bg=#1e1e2e]#[fg=#1e1e2e,bg=#89b4fa,bold] #H '
# 현재 윈도우 스타일
setw -g window-status-current-format '#[fg=#1e1e2e,bg=#a6e3a1,bold] #I:#W#{?window_zoomed_flag, Z,} '
# 비활성 윈도우 스타일
setw -g window-status-format '#[fg=#585b70] #I:#W '
# 윈도우 목록 정렬
set -g status-justify left
위 설정의 결과:
┌──────────────────────────────────────────────────────────────┐
│ dev 1:editor 2:server 3:logs 2026-03-01 │
│ 14:30 │
└──────────────────────────────────────────────────────────────┘
8.5 색상 설정 (256 Color, True Color)
# 256 color 지원
set -g default-terminal "screen-256color"
# True Color (24-bit) 지원
set -ga terminal-overrides ",xterm-256color:Tc"
# 또는 alacritty 사용 시
set -ga terminal-overrides ",alacritty:Tc"
# 페인 테두리 색상
set -g pane-border-style 'fg=#585b70'
set -g pane-active-border-style 'fg=#89b4fa'
# 메시지 스타일
set -g message-style 'fg=#cdd6f4,bg=#1e1e2e,bold'
# 복사 모드 하이라이트 색상
setw -g mode-style 'fg=#1e1e2e,bg=#f5c2e7,bold'
Tip: True Color 지원 여부를 확인하려면 다음 스크립트를 실행한다.
> awk 'BEGIN{
> s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
> for (colession=0; colession<77; colession++) {
> r = 255-(colession*255/76);
> g = (colession*510/76);
> b = (colession*255/76);
> if (g>255) g = 510-g;
> printf "\033[48;2;%d;%d;%dm", r,g,b;
> printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
> printf "%s\033[0m", substr(s,colession+1,1);
> }
> printf "\n";
> }'
>
8.6 클립보드 연동
Tmux 내에서 복사한 텍스트를 시스템 클립보드와 동기화하는 설정이다.
# macOS (pbcopy/pbpaste)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# Linux (xclip)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# Linux (xsel)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel --clipboard --input"
# Linux (wl-copy, Wayland)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
# 크로스 플랫폼 자동 감지
if-shell "uname | grep -q Darwin" {
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
} {
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
}
8.7 완성된 .tmux.conf 예시
모든 추천 설정을 통합한 완성본이다.
# ═══════════════════════════════════════════════════════════════
# ~/.tmux.conf - 실전 최적화 설정
# ═══════════════════════════════════════════════════════════════
# ─── Prefix ───────────────────────────────────────────────────
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# ─── 기본 설정 ────────────────────────────────────────────────
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 50000
set -sg escape-time 0
set -g repeat-time 600
set -g focus-events on
set -g mouse on
setw -g mode-keys vi
set -g status-keys vi
# ─── 색상 ─────────────────────────────────────────────────────
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# ─── 키바인딩 ─────────────────────────────────────────────────
# 설정 리로드
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# 직관적 분할 (현재 경로 유지)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
unbind '"'
unbind %
# Vi 스타일 페인 이동
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# 페인 리사이즈
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Alt + 방향키로 prefix 없이 페인 이동
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift + 방향키로 윈도우 전환
bind -n S-Left previous-window
bind -n S-Right next-window
# 동기화 토글
bind S setw synchronize-panes \; display "Sync #{?synchronize-panes,ON,OFF}"
# ─── 복사 모드 ────────────────────────────────────────────────
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi V send-keys -X select-line
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi r send-keys -X rectangle-toggle
# ─── 상태바 ───────────────────────────────────────────────────
set -g status-position bottom
set -g status-interval 5
set -g status-style 'bg=#1e1e2e,fg=#cdd6f4'
set -g status-left-length 50
set -g status-left '#[fg=#1e1e2e,bg=#89b4fa,bold] #S #[default] '
set -g status-right '#[fg=#cdd6f4]%Y-%m-%d %H:%M #[fg=#1e1e2e,bg=#89b4fa,bold] #H '
setw -g window-status-current-format '#[fg=#1e1e2e,bg=#a6e3a1,bold] #I:#W#{?window_zoomed_flag, Z,} '
setw -g window-status-format '#[fg=#585b70] #I:#W '
# ─── 페인 테두리 ──────────────────────────────────────────────
set -g pane-border-style 'fg=#585b70'
set -g pane-active-border-style 'fg=#89b4fa'
9. 플러그인
9.1 TPM (Tmux Plugin Manager)
TPM은 Tmux 플러그인을 관리하는 표준 도구다.
설치:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
.tmux.conf에 추가:
# 플러그인 목록
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
# TPM 초기화 (반드시 .tmux.conf 맨 마지막에 위치)
run '~/.tmux/plugins/tpm/tpm'
플러그인 관리 키:
<prefix> I # 플러그인 설치 (Install)
<prefix> U # 플러그인 업데이트 (Update)
<prefix> Alt-u # 사용하지 않는 플러그인 제거 (Uninstall)
9.2 tmux-sensible
합리적인 기본값을 설정해주는 플러그인이다. 모든 사용자에게 유용한 설정을 한번에 적용한다.
set -g @plugin 'tmux-plugins/tmux-sensible'
포함되는 설정:
utf-8활성화escape-time0으로 설정history-limit50000display-time4000ms- 포커스 이벤트 활성화
- Emacs 키바인딩을 상태줄에 적용
9.3 tmux-resurrect
Tmux 세션을 파일 시스템에 저장하고 복원할 수 있는 플러그인이다. 시스템 재시작 후에도 세션 구조를 완벽하게 복원한다.
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Vim 세션 복원 (선택)
set -g @resurrect-strategy-vim 'session'
# Neovim 세션 복원 (선택)
set -g @resurrect-strategy-nvim 'session'
# 페인 내용 복원
set -g @resurrect-capture-pane-contents 'on'
사용 방법:
<prefix> Ctrl-s # 세션 저장 (Save)
<prefix> Ctrl-r # 세션 복원 (Restore)
복원되는 항목:
- 모든 세션, 윈도우, 페인의 구조
- 각 페인의 현재 작업 디렉토리
- 페인 레이아웃
- 활성 / 대체 윈도우 상태
- 실행 중이던 프로그램 (vim, htop, man 등)
9.4 tmux-continuum
tmux-resurrect의 저장/복원을 자동화하는 플러그인이다.
set -g @plugin 'tmux-plugins/tmux-continuum'
# 15분마다 자동 저장
set -g @continuum-save-interval '15'
# Tmux 서버 시작 시 자동 복원
set -g @continuum-restore 'on'
# 시스템 부팅 시 Tmux 자동 시작 (macOS)
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
9.5 tmux-yank
시스템 클립보드와의 통합을 자동으로 처리해주는 플러그인이다.
set -g @plugin 'tmux-plugins/tmux-yank'
# 복사 후 복사 모드 유지 (기본값은 종료)
set -g @yank_action 'copy-pipe'
설치하면 복사 모드에서 y를 누르면 자동으로 시스템 클립보드에 복사된다. macOS에서는 pbcopy, Linux에서는 xclip 또는 xsel이 자동으로 감지된다.
9.6 그 외 추천 플러그인
| 플러그인 | 설명 |
|---|---|
tmux-plugins/tmux-prefix-highlight | Prefix Key 입력 시 상태바에 하이라이트 표시 |
tmux-plugins/tmux-pain-control | 페인 관리 키바인딩 일관성 개선 |
tmux-plugins/tmux-sessionist | 세션 관리 명령어 확장 |
tmux-plugins/tmux-open | 복사 모드에서 URL, 파일 경로 열기 |
tmux-plugins/tmux-fpp | Facebook PathPicker와 연동하여 파일 경로 빠른 열기 |
catppuccin/tmux | Catppuccin 테마 적용 |
dracula/tmux | Dracula 테마 적용 |
wfxr/tmux-fzf-url | fzf를 이용한 URL 선택 및 열기 |
10. 고급 기능
10.1 send-keys: 페인에 명령어 전송
send-keys는 특정 페인에 키 입력을 프로그래밍 방식으로 전송하는 강력한 기능이다.
# 현재 페인에 명령어 전송
tmux send-keys "ls -la" Enter
# 특정 세션의 특정 윈도우, 특정 페인에 전송
tmux send-keys -t dev:1.0 "npm start" Enter
# Ctrl-c 전송 (실행 중인 프로세스 중단)
tmux send-keys -t dev:1.0 C-c
# 여러 키 연속 전송
tmux send-keys -t dev:1.0 "cd ~/project" Enter "git status" Enter
타겟 지정 문법:
세션:윈도우.페인
dev:1.0 # dev 세션, 1번 윈도우, 0번 페인
:2.1 # 현재 세션, 2번 윈도우, 1번 페인
monitoring: # monitoring 세션, 현재 윈도우
10.2 Tmux 스크립팅
Tmux의 모든 명령어를 셸 스크립트에서 사용할 수 있어, 복잡한 개발 환경을 한 번에 구성할 수 있다.
#!/bin/bash
# dev-env.sh - 개발 환경 자동 구성 스크립트
SESSION="dev"
PROJECT_DIR="$HOME/workspace/my-project"
# 기존 세션이 있으면 종료
tmux kill-session -t $SESSION 2>/dev/null
# 새 세션 생성 (detached 모드, 첫 번째 윈도우 이름: editor)
tmux new-session -d -s $SESSION -n editor -c $PROJECT_DIR
# editor 윈도우에서 Neovim 실행
tmux send-keys -t $SESSION:editor "nvim ." Enter
# server 윈도우 생성
tmux new-window -t $SESSION -n server -c $PROJECT_DIR
tmux send-keys -t $SESSION:server "npm run dev" Enter
# logs 윈도우 생성 (수평 분할)
tmux new-window -t $SESSION -n logs -c $PROJECT_DIR
tmux send-keys -t $SESSION:logs "tail -f logs/app.log" Enter
tmux split-window -v -t $SESSION:logs -c $PROJECT_DIR
tmux send-keys -t $SESSION:logs.1 "tail -f logs/error.log" Enter
# test 윈도우 생성
tmux new-window -t $SESSION -n test -c $PROJECT_DIR
tmux send-keys -t $SESSION:test "npm test -- --watch" Enter
# git 윈도우 생성
tmux new-window -t $SESSION -n git -c $PROJECT_DIR
tmux send-keys -t $SESSION:git "git status" Enter
# 첫 번째 윈도우로 이동
tmux select-window -t $SESSION:editor
# 세션에 attach
tmux attach -t $SESSION
10.3 tmuxinator: YAML 기반 세션 자동화
tmuxinator는 YAML 파일로 Tmux 세션 레이아웃을 정의하고 한 번에 생성할 수 있는 도구다.
설치:
# Ruby gem으로 설치
gem install tmuxinator
# macOS
brew install tmuxinator
프로젝트 설정 생성:
tmuxinator new my-project
~/.config/tmuxinator/my-project.yml:
name: my-project
root: ~/workspace/my-project
windows:
- editor:
layout: main-vertical
panes:
- nvim .
- # 빈 셸
- server:
panes:
- npm run dev
- logs:
layout: even-vertical
panes:
- tail -f logs/app.log
- tail -f logs/error.log
- tail -f logs/access.log
- database:
panes:
- docker compose up -d db && sleep 2 && psql -h localhost -U app
- test:
panes:
- npm test -- --watch
실행:
# 프로젝트 시작
tmuxinator start my-project
# 축약형
mux my-project
# 프로젝트 중지
tmuxinator stop my-project
# 설정 편집
tmuxinator edit my-project
# 프로젝트 목록
tmuxinator list
# 프로젝트 삭제
tmuxinator delete my-project
10.4 tmuxp: JSON/YAML 기반 대안
tmuxp은 Python 기반의 세션 관리 도구로, tmuxinator와 유사하지만 Python 생태계를 선호하는 경우 유용하다.
# 설치
pip install tmuxp
~/.config/tmuxp/dev.yaml:
session_name: dev
start_directory: ~/workspace/my-project
windows:
- window_name: code
layout: main-vertical
panes:
- shell_command:
- nvim .
- shell_command:
- git status
- window_name: server
panes:
- npm run dev
- window_name: monitoring
layout: even-vertical
panes:
- htop
- tail -f /var/log/syslog
# 세션 로드
tmuxp load dev.yaml
tmuxp load ~/.config/tmuxp/dev.yaml
# 현재 세션을 YAML로 내보내기 (freeze)
tmuxp freeze my-session
10.5 조건부 명령어
# 세션 존재 여부 확인 후 조건부 실행
tmux has-session -t dev 2>/dev/null && \
tmux attach -t dev || \
tmux new -s dev
# .tmux.conf에서 조건부 설정
if-shell "uname | grep -q Darwin" \
"set -g default-command 'reattach-to-user-namespace -l zsh'" \
""
# Tmux 버전별 조건부 설정
if-shell '[ "$(tmux -V | cut -d" " -f2 | tr -d "a-z")" -ge 32 ]' \
"set -g popup-style 'bg=#1e1e2e'" \
""
10.6 display-popup (Tmux 3.2+)
팝업 윈도우는 플로팅 창으로 임시 작업을 수행할 수 있다.
# 기본 팝업 (종료 시 자동 닫힘)
tmux display-popup
# 크기와 위치 지정
tmux display-popup -w 80% -h 60% -x C -y C
# 명령어 실행 팝업
tmux display-popup -E "htop"
tmux display-popup -E -w 90% -h 90% "lazygit"
# fzf로 세션 선택 팝업
tmux display-popup -E "tmux list-sessions | fzf | cut -d: -f1 | xargs tmux switch-client -t"
# 키바인딩으로 팝업 등록
bind g display-popup -E -w 80% -h 80% "lazygit"
bind f display-popup -E -w 60% -h 60% "fzf --preview 'cat {}' | xargs nvim"
11. 실전 활용 시나리오
11.1 SSH 원격 작업 시 세션 유지
Tmux의 가장 핵심적인 사용 사례다. SSH 연결이 끊어져도 세션이 서버에 유지된다.
# 1. 원격 서버 접속
ssh user@remote-server
# 2. Tmux 세션 시작
tmux new -s work
# 3. 작업 수행 (빌드, 배포, 모니터링 등)
make build && make deploy
# 4. SSH 연결 끊김 또는 의도적 detach
# <prefix> d 또는 네트워크 끊김
# 5. 재접속 후 세션 복귀
ssh user@remote-server
tmux attach -t work
# 모든 작업이 그대로 유지되어 있다!
장시간 작업 패턴:
# 데이터 마이그레이션 등 장시간 작업 시작
ssh user@db-server
tmux new -s migration
python migrate_data.py --source prod --target staging
# detach하고 퇴근 (<prefix> d)
# 다음 날 출근 후:
ssh user@db-server
tmux attach -t migration
# 마이그레이션 진행 상태 확인
11.2 개발 환경 분할
하나의 화면에서 개발에 필요한 모든 정보를 동시에 확인한다.
┌─────────────────────────────────────────┐
│ Window: editor │
│ ┌──────────────────────┬──────────────┐ │
│ │ │ $ npm run dev│ │
│ │ nvim main.ts │ > Server on │ │
│ │ │ port 3000 │ │
│ │ ├──────────────┤ │
│ │ │ $ npm test │ │
│ │ │ PASS: 42/42 │ │
│ └──────────────────────┴──────────────┘ │
└─────────────────────────────────────────┘
이를 자동으로 구성하는 스크립트:
#!/bin/bash
# setup-dev.sh
SESSION="dev"
tmux new-session -d -s $SESSION -n code -c ~/project
# 메인 편집기 (좌측 70%)
tmux send-keys -t $SESSION:code "nvim ." Enter
# 우측 상단: 개발 서버 (우측 30%)
tmux split-window -h -p 30 -t $SESSION:code -c ~/project
tmux send-keys "npm run dev" Enter
# 우측 하단: 테스트 러너
tmux split-window -v -p 50 -t $SESSION:code.1 -c ~/project
tmux send-keys "npm test -- --watch" Enter
# 좌측 페인(편집기)에 포커스
tmux select-pane -t $SESSION:code.0
tmux attach -t $SESSION
11.3 페어 프로그래밍
Tmux의 클라이언트-서버 아키텍처를 활용하면 같은 세션에 여러 사용자가 접속하여 실시간으로 같은 화면을 보며 작업할 수 있다.
방법 1: 같은 사용자 계정 공유
# 개발자 A: 세션 생성
tmux new -s pair
# 개발자 B: 같은 서버에 SSH 접속 후 세션에 attach
tmux attach -t pair
# 두 개발자가 같은 화면을 실시간으로 공유
방법 2: 독립된 윈도우 (같은 세션, 다른 뷰)
# 개발자 A: 세션 생성
tmux new -s pair
# 개발자 B: 같은 세션에 attach하되 독립적으로 윈도우 전환 가능
tmux new -t pair -s pair-b
방법 3: tmate (Tmux 기반 원격 공유)
# tmate 설치
brew install tmate # macOS
sudo apt install tmate # Ubuntu
# tmate 세션 시작
tmate
# 접속 URL이 표시됨
# SSH: ssh xxxxx@lon1.tmate.io
# Web: https://tmate.io/t/xxxxx
# 상대방에게 URL을 공유하면 즉시 세션 공유 가능
11.4 CI/CD 모니터링
여러 시스템의 상태를 동시에 모니터링하는 대시보드를 구성한다.
#!/bin/bash
# monitoring-dashboard.sh
SESSION="monitor"
tmux new-session -d -s $SESSION -n dashboard
# 4분할 레이아웃
# 좌상: 시스템 리소스
tmux send-keys "htop" Enter
# 우상: 어플리케이션 로그
tmux split-window -h -p 50
tmux send-keys "tail -f /var/log/app/production.log | jq ." Enter
# 좌하: 네트워크 트래픽
tmux split-window -v -p 50 -t 0
tmux send-keys "watch -n 1 'ss -tuln'" Enter
# 우하: 디스크 & 도커 상태
tmux split-window -v -p 50 -t 2
tmux send-keys "watch -n 5 'df -h && echo --- && docker ps --format \"table {{.Names}}\t{{.Status}}\t{{.Ports}}\"'" Enter
tmux attach -t $SESSION
11.5 동기화 모드 (Synchronize Panes)
여러 서버에 동시에 같은 명령어를 실행해야 할 때 유용하다.
# 동기화 모드 활성화/비활성화
<prefix> :setw synchronize-panes on
<prefix> :setw synchronize-panes off
# 또는 커스텀 바인딩 사용 (8장에서 설정한 경우)
<prefix> S
활용 예시:
#!/bin/bash
# multi-server.sh - 여러 서버에 동시 접속
SESSION="multi"
SERVERS=("web1" "web2" "web3" "db1")
tmux new-session -d -s $SESSION
# 첫 번째 서버
tmux send-keys "ssh ${SERVERS[0]}" Enter
# 나머지 서버들을 분할하여 접속
for ((i=1; i<${#SERVERS[@]}; i++)); do
tmux split-window -t $SESSION
tmux send-keys "ssh ${SERVERS[$i]}" Enter
tmux select-layout tiled # 균등 배치
done
# 동기화 활성화
tmux setw -t $SESSION synchronize-panes on
tmux attach -t $SESSION
# 이제 입력하는 모든 명령어가 4개 서버에 동시 실행된다!
12. Tmux vs Screen vs Zellij 비교
| 항목 | Tmux | GNU Screen | Zellij |
|---|---|---|---|
| 릴리스 | 2007 | 1987 | 2021 |
| 언어 | C | C | Rust |
| 아키텍처 | 클라이언트-서버 | 단일 프로세스 | 클라이언트-서버 (WebAssembly 플러그인) |
| 수직 분할 | 기본 지원 | 패치 필요 (4.0+ 기본 지원) | 기본 지원 |
| 마우스 지원 | 설정 필요 | 제한적 | 기본 활성화 |
| 스크립팅 | 강력함 | 제한적 | WASM 플러그인 |
| 상태바 | 고도로 커스터마이징 | 제한적 | 기본 제공, 탭바 스타일 |
| 플러그인 생태계 | TPM (활발) | 거의 없음 | WASM 플러그인 (성장 중) |
| 설정 파일 | .tmux.conf | .screenrc | KDL 형식 |
| 복사 모드 | Vi/Emacs | 기본 모드 | 기본 모드 |
| True Color | 지원 | 제한적 | 지원 |
| 세션 공유 | 네이티브 지원 | 네이티브 지원 | 지원 |
| 학습 곡선 | 중간 | 낮음 | 낮음 (직관적 UI) |
| 유지보수 | 활발 | 느림 | 매우 활발 |
| 서버 배포 시 | 대부분 설치됨 | 대부분 설치됨 | 별도 설치 필요 |
| 추천 대상 | 숙련된 CLI 사용자, DevOps | 레거시 환경 유지보수 | 입문자, 모던 터미널 선호자 |
결론:
- Tmux: 가장 범용적이고 강력하며, 서버 환경에서 사실상 표준이다. 숙련될수록 생산성이 극대화된다.
- Screen: 오래된 서버에 이미 설치되어 있는 경우에만 사용을 권장한다. 신규 프로젝트에서는 선택할 이유가 없다.
- Zellij: Rust 기반의 현대적 대안으로, 직관적 UI와 기본 레이아웃 제공이 장점이다. 다만 서버 환경에서의 보급률이 아직 낮다.
13. 실전 치트시트: 자주 쓰는 명령어 40선
13.1 세션 명령어
| 번호 | 명령어 / 키바인딩 | 설명 |
|---|---|---|
| 1 | tmux new -s name | 이름을 지정하여 새 세션 생성 |
| 2 | tmux ls | 세션 목록 조회 |
| 3 | tmux a -t name | 특정 세션에 접속 (attach) |
| 4 | tmux new -A -s name | 세션이 있으면 attach, 없으면 생성 |
| 5 | <prefix> d | 현재 세션에서 분리 (detach) |
| 6 | <prefix> $ | 현재 세션 이름 변경 |
| 7 | <prefix> s | 세션 목록에서 선택하여 전환 |
| 8 | tmux kill-session -t name | 특정 세션 종료 |
| 9 | tmux kill-server | Tmux 서버 전체 종료 |
| 10 | <prefix> ( / <prefix> ) | 이전/다음 세션으로 전환 |
13.2 윈도우 명령어
| 번호 | 명령어 / 키바인딩 | 설명 |
|---|---|---|
| 11 | <prefix> c | 새 윈도우 생성 |
| 12 | <prefix> , | 현재 윈도우 이름 변경 |
| 13 | <prefix> n / <prefix> p | 다음/이전 윈도우로 이동 |
| 14 | <prefix> 0-9 | 윈도우 번호로 직접 이동 |
| 15 | <prefix> w | 윈도우 목록에서 인터랙티브 선택 |
| 16 | <prefix> l | 마지막 사용 윈도우로 토글 |
| 17 | <prefix> & | 현재 윈도우 닫기 |
| 18 | <prefix> f | 윈도우 이름으로 검색 |
| 19 | tmux move-window -r | 윈도우 번호 재정렬 |
| 20 | tmux swap-window -t N | 현재 윈도우와 N번 윈도우 위치 교환 |
13.3 페인 명령어
| 번호 | 명령어 / 키바인딩 | 설명 |
|---|---|---|
| 21 | <prefix> % | 수직 분할 (좌우) |
| 22 | <prefix> " | 수평 분할 (상하) |
| 23 | <prefix> 방향키 | 방향키로 페인 이동 |
| 24 | <prefix> o | 다음 페인으로 순환 이동 |
| 25 | <prefix> z | 페인 줌 토글 (전체 화면) |
| 26 | <prefix> x | 현재 페인 닫기 |
| 27 | <prefix> ! | 현재 페인을 새 윈도우로 분리 |
| 28 | <prefix> q | 페인 번호 표시 |
| 29 | <prefix> { / <prefix> } | 페인 위치 이전/다음으로 이동 |
| 30 | <prefix> Space | 레이아웃 순환 전환 |
| 31 | <prefix> Ctrl-방향키 | 페인 크기 1칸씩 조절 |
| 32 | <prefix> Alt-방향키 | 페인 크기 5칸씩 조절 |
13.4 복사 모드 및 기타 명령어
| 번호 | 명령어 / 키바인딩 | 설명 |
|---|---|---|
| 33 | <prefix> [ | 복사 모드 진입 |
| 34 | <prefix> ] | 버퍼 내용 붙여넣기 |
| 35 | <prefix> ? | 키바인딩 목록 보기 |
| 36 | <prefix> : | 명령어 프롬프트 열기 |
| 37 | <prefix> t | 현재 시간 표시 |
| 38 | <prefix> ~ | 메시지 히스토리 보기 |
| 39 | tmux source ~/.tmux.conf | 설정 파일 리로드 |
| 40 | tmux display-popup -E "cmd" | 팝업 윈도우로 명령어 실행 |
14. 트러블슈팅
14.1 색상이 제대로 표시되지 않음
# 문제: Vim/Neovim의 색상이 Tmux 내에서 깨짐
# 해결: .tmux.conf에 다음 추가
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
# 확인: Tmux 내에서 다음 명령어 실행
tput colors
# 256이 출력되어야 한다
# TERM 환경변수 확인
echo $TERM
# screen-256color 또는 tmux-256color여야 한다
14.2 Neovim에서 ESC 지연
# 문제: Tmux 내에서 Neovim의 ESC 반응이 느림
# 원인: Tmux가 ESC 키 입력 후 다른 키 조합인지 확인하기 위해 대기
# 해결: .tmux.conf에 다음 추가
set -sg escape-time 0
# 또는 최소값으로 설정
set -sg escape-time 10
14.3 마우스 스크롤이 작동하지 않음
# 문제: 마우스 휠로 스크롤이 안 됨
# 해결 1: 마우스 지원 활성화
set -g mouse on
# 해결 2: Tmux 2.1 이전 버전이라면 (레거시 문법)
set -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
14.4 클립보드가 작동하지 않음 (macOS)
# 문제: macOS에서 pbcopy/pbpaste가 Tmux 내에서 작동하지 않음
# 해결 1: reattach-to-user-namespace 설치 (오래된 macOS)
brew install reattach-to-user-namespace
# .tmux.conf에 추가:
set -g default-command "reattach-to-user-namespace -l $SHELL"
# 해결 2: tmux-yank 플러그인 사용 (추천)
set -g @plugin 'tmux-plugins/tmux-yank'
# 해결 3: Tmux 2.6 이상이면 set-clipboard 활성화
set -g set-clipboard on
14.5 SSH 접속 후 Tmux 세션이 보이지 않음
# 문제: SSH 재접속 후 tmux ls에 세션이 없음
# 원인 1: Tmux 서버가 종료됨 (시스템 재시작 등)
# 해결: tmux-resurrect와 tmux-continuum 플러그인으로 자동 백업/복원
# 원인 2: 다른 사용자로 SSH 접속
# 확인: Tmux 소켓 위치 확인
ls -la /tmp/tmux-$(id -u)/
# 원인 3: 다른 소켓 경로로 Tmux를 시작한 경우
tmux -L my_socket ls # 특정 소켓의 세션 확인
14.6 "sessions should be nested with care" 경고
# 문제: Tmux 내에서 Tmux를 실행하려 하면 경고가 나타남
# 해결: TMUX 환경변수를 해제하고 실행
unset TMUX && tmux
# 또는 Nested Tmux용 Prefix 설정
# 외부 Tmux: Ctrl-a, 내부 Tmux: Ctrl-b
# 내부 Tmux의 기본 Prefix를 유지하면 자연스럽게 분리된다
14.7 한글 입력이 깨짐
# 문제: Tmux 내에서 한글이 깨지거나 잘려서 표시됨
# 해결: UTF-8 설정 확인
# .tmux.conf에 추가 (Tmux 2.2 이전)
set -g utf8 on
setw -g utf8 on
# 터미널의 로케일 설정 확인
locale
# LANG=ko_KR.UTF-8 또는 en_US.UTF-8이어야 한다
# .bashrc 또는 .zshrc에 추가
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
14.8 Tmux 버전 확인 및 업그레이드
일부 기능은 특정 버전 이상에서만 사용 가능하다.
# 현재 버전 확인
tmux -V
# 주요 버전별 기능:
# 2.1: mouse 통합 옵션
# 2.4: copy-mode-vi 테이블
# 2.6: set-clipboard
# 3.0: 정규식 검색, 조건부 바인딩
# 3.2: display-popup
# 3.3: next-prompt / previous-prompt
# 3.4: 커스텀 메뉴
# 최신 버전으로 업그레이드 (Ubuntu)
sudo add-apt-repository ppa:rsurbhi/tmux
sudo apt update && sudo apt install -y tmux
# macOS
brew upgrade tmux
15. 마무리: Tmux 학습 로드맵
Tmux는 처음에 진입 장벽이 있지만, 일단 손에 익으면 터미널 작업 생산성이 극적으로 향상된다. 아래 로드맵을 따라 단계적으로 학습하는 것을 추천한다.
Level 1 (1일차)
├── tmux new / attach / detach / ls / kill-session
├── <prefix> c / n / p (윈도우 생성/전환)
└── <prefix> % / " (페인 분할)
Level 2 (1주차)
├── 페인 이동 (<prefix> 방향키)
├── 페인 줌 (<prefix> z)
├── 복사 모드 (<prefix> [)
└── .tmux.conf 기본 설정
Level 3 (2주차)
├── 커스텀 키바인딩
├── 상태바 커스터마이징
├── 클립보드 연동
└── 마우스 설정
Level 4 (1개월)
├── TPM 플러그인 시스템
├── tmux-resurrect / continuum
├── send-keys 스크립팅
└── tmuxinator / tmuxp 세션 자동화
Level 5 (지속적 개선)
├── display-popup 활용
├── 동기화 모드 (synchronize-panes)
├── Nested Tmux 운영
└── 페어 프로그래밍 세션 공유
Tmux는 단순한 터미널 도구가 아니라, 서버 관리, 개발 워크플로우, 원격 협업의 근간이 되는 인프라 도구다. 이 가이드에서 다룬 명령어를 하나씩 실습하면서 자신만의 .tmux.conf를 구축해 나가면, 터미널 앞에서 보내는 모든 시간이 효율적으로 변할 것이다.
The Complete Tmux Command Guide: Every Command to 10x Your Productivity with a Terminal Multiplexer
- 1. Introduction to Tmux
- 2. Installation and Basic Concepts
- 3. Session Management
- 4. Window Management
- 5. Pane Management
- 6. Copy Mode
- 7. Key Binding Customization
- 8. .tmux.conf Configuration Guide
- 9. Plugins
- 10. Advanced Features
- 11. Practical Use Scenarios
- 12. Tmux vs Screen vs Zellij Comparison
- 13. Cheat Sheet: Top 40 Most-Used Commands
- 14. Troubleshooting
- 15. Conclusion: Tmux Learning Roadmap
- Quiz
1. Introduction to Tmux
1.1 What Is a Terminal Multiplexer?
A Terminal Multiplexer is a tool that lets you create, split, and switch between multiple virtual terminal sessions within a single terminal screen. Even with just one physical monitor, you can run dozens of terminals simultaneously, switching between them instantly or keeping them running in the background.
Tmux (Terminal Multiplexer) is the most widely used modern tool in this category, developed as open source under the BSD license.
The core problems Tmux solves are:
- Preventing work loss on SSH disconnection: Sessions persist on the server, so you can resume right where you left off after reconnecting
- Screen splitting: View code editing, server logs, and test execution simultaneously on one screen
- Work context switching: Separate sessions per project for instant switching
- Pair programming: Multiple users connect to the same session for collaboration
1.2 GNU Screen vs Tmux Comparison
Before Tmux, GNU Screen was the leading terminal multiplexer. Here are the key differences between the two tools.
| Feature | GNU Screen | Tmux |
|---|---|---|
| First Release | 1987 | 2007 |
| Architecture | Single process | Client-server model |
| Screen Split | Horizontal only by default | Both horizontal/vertical by default |
| Scripting | Limited | Powerful command system |
| Status Bar | None by default, manual setup | Built-in, highly customizable |
| Copy Mode | Basic mode | Vi/Emacs key binding options |
| Plugin Ecosystem | Almost none | Active TPM-based ecosystem |
| Maintenance | Slow updates | Active development |
| License | GPL | BSD |
In conclusion, Tmux is overwhelmingly the better choice for new projects. Tmux leads in scripting, plugins, and community support across the board.
1.3 Use Cases
Here are the most representative scenarios where Tmux shines.
- SSH remote server work: Sessions persist even in unstable network environments
- Development environment setup: Place editor + server + logs + tests on one screen
- Server monitoring: Simultaneously monitor htop, log tails, and network monitoring
- Long-running tasks: Detach builds, data migrations, etc. and go home
- Pair programming: Multiple developers connect to the same session for real-time collaboration
- CI/CD debugging: Monitor each pipeline stage in separate panes
2. Installation and Basic Concepts
2.1 Installation
Installation methods by operating system:
# Ubuntu / Debian
sudo apt update && sudo apt install -y tmux
# CentOS / RHEL / Rocky Linux
sudo yum install -y tmux
# or
sudo dnf install -y tmux
# macOS (Homebrew)
brew install tmux
# Arch Linux
sudo pacman -S tmux
# Build from source (when you need the latest version)
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make
sudo make install
Verify installation:
tmux -V
# tmux 3.5a
2.2 Core Hierarchy: Session > Window > Pane
To understand Tmux's architecture, you must grasp three layers.
Tmux Server (background process)
└── Session (logical work unit)
├── Window 0 (similar to tabs)
│ ├── Pane 0 (split region)
│ ├── Pane 1
│ └── Pane 2
├── Window 1
│ ├── Pane 0
│ └── Pane 1
└── Window 2
└── Pane 0
| Concept | Description | Analogy |
|---|---|---|
| Server | The Tmux process. Manages all sessions | Operating system |
| Session | Independent workspace. Contains multiple Windows | Desktop/workspace |
| Window | Full screen within a session. Switchable like tabs | Browser tab |
| Pane | Individual terminal area from splitting a window | Screen split |
2.3 Prefix Key Concept
Tmux uses a Prefix Key for all key bindings. The default is Ctrl-b.
How it works:
- Press
Ctrl-b(press simultaneously then release) - Then press the desired command key
For example, to create a new window:
- Press
Ctrl-b - Press
c
In this document, the Prefix Key is referred to as <prefix>. So <prefix> c means press Ctrl-b then press c.
Tip: If
Ctrl-bfeels uncomfortable, you can change it toCtrl-a(Screen style) orCtrl-Spacein.tmux.conf. This is covered in Section 7.
3. Session Management
Sessions are the top-level work unit in Tmux. Manage work contexts by separating sessions per project or purpose.
3.1 Creating Sessions
# Create default session (auto-named: 0, 1, 2, ...)
tmux
# Create session with a name
tmux new -s dev
# Create with name and start in a specific directory
tmux new -s project -c ~/workspace/my-project
# Create session and immediately run a command
tmux new -s monitoring 'htop'
# Create session without attaching (background)
tmux new -s background -d
# Create with window name specified
tmux new -s dev -n editor
3.2 Listing Sessions
# List sessions
tmux ls
# or
tmux list-sessions
# Example output:
# dev: 3 windows (created Mon Mar 1 10:00:00 2026)
# monitoring: 1 windows (created Mon Mar 1 10:05:00 2026)
# background: 2 windows (created Mon Mar 1 10:10:00 2026) (attached)
You can also view the session list from within Tmux.
<prefix> s # Show session list interactively
3.3 Attaching to Sessions
# Attach to the last used session
tmux attach
# or
tmux a
# Attach to a specific session
tmux attach -t dev
# or
tmux a -t dev
# Force attach even if another client is connected (detaches existing client)
tmux attach -dt dev
3.4 Detaching from Sessions
When you detach from a session, it continues running in the background.
<prefix> d # Detach from current session
# Detach a specific client (from outside)
tmux detach-client -t dev
3.5 Renaming Sessions
<prefix> $ # Rename current session (prompt appears)
# Rename session from outside
tmux rename-session -t old_name new_name
3.6 Switching Sessions
<prefix> s # Select and switch from session list
<prefix> ( # Switch to previous session
<prefix> ) # Switch to next session
# Switch to a specific session from outside (when already attached)
tmux switch-client -t monitoring
3.7 Terminating Sessions
# Kill a specific session
tmux kill-session -t dev
# Kill all sessions except the current one
tmux kill-session -a
# Kill all sessions except a specific one
tmux kill-session -a -t dev
# Kill the entire Tmux server (kills all sessions)
tmux kill-server
Terminating from inside a session:
# Exit or Ctrl-d in the last window/pane to close the session
exit
3.8 Practical Session Management Patterns
# Pattern: attach if session exists, create if not
tmux new -A -s dev
# This is equivalent to:
# tmux has-session -t dev 2>/dev/null && tmux attach -t dev || tmux new -s dev
4. Window Management
Windows function like tabs within a session. The window list is displayed in the bottom status bar.
4.1 Creating Windows
<prefix> c # Create new window
# Create window from command line
tmux new-window
# Create window with a name
tmux new-window -n logs
# Create window in a specific directory
tmux new-window -c ~/workspace/logs -n logs
# Create window at a specific position (index)
tmux new-window -t 3
4.2 Renaming Windows
<prefix> , # Rename current window (prompt appears)
# Rename window from command line
tmux rename-window -t 0 editor
Tip: To prevent window names from automatically changing when a shell runs, add the following to
.tmux.conf.
set-option -g allow-rename off
4.3 Switching Windows
<prefix> 0~9 # Jump directly to window number (0-9)
<prefix> n # Move to next window
<prefix> p # Move to previous window
<prefix> l # Toggle to last used window
<prefix> w # Interactively select from window list
<prefix> ' # Enter window index to jump to (useful for 10+)
<prefix> f # Search by window name to jump
4.4 Moving and Reordering Windows
# Change window order (move current window to position 3)
tmux move-window -t 3
# Move window to another session
tmux move-window -t other_session:
# Move window to specific position in another session
tmux move-window -t other_session:2
# Swap current window with a specific window
tmux swap-window -t 0
# Renumber windows (remove gaps)
tmux move-window -r
4.5 Closing Windows
<prefix> & # Close current window (confirmation prompt shown)
# Close specific window from command line
tmux kill-window -t 2
# Close all windows except the current one
tmux kill-window -a
4.6 Listing Windows
# List windows across all sessions
tmux list-windows -a
# List windows in a specific session
tmux list-windows -t dev
5. Pane Management
Panes split windows to place multiple terminals on one screen. This is Tmux's most powerful and frequently used feature.
5.1 Splitting Panes
<prefix> % # Vertical split (left-right)
<prefix> " # Horizontal split (top-bottom)
# Split panes from command line
tmux split-window # Horizontal split
tmux split-window -h # Vertical split
# Split in a specific directory
tmux split-window -h -c ~/workspace
# Split with a specific size (30% of total)
tmux split-window -p 30
tmux split-window -h -p 40
# Split with specific row/column count
tmux split-window -l 10 # 10 rows high
tmux split-window -h -l 40 # 40 columns wide
# Split and run a command
tmux split-window 'tail -f /var/log/syslog'
5.2 Pane Navigation
<prefix> Arrow keys(Up/Down/Left/Right) # Navigate panes with arrow keys
<prefix> o # Cycle to next pane
<prefix> ; # Toggle to last active pane
<prefix> q # Show pane numbers (press number to jump to that pane)
Tip: If you prefer Vi-style navigation, add the following to
.tmux.conf.bind h select-pane -L # Left pane bind j select-pane -D # Down pane bind k select-pane -U # Up pane bind l select-pane -R # Right pane
5.3 Resizing Panes
<prefix> Ctrl-Arrow # Resize by 1 cell
<prefix> Alt-Arrow # Resize by 5 cells
# Resize from command line
tmux resize-pane -D 5 # Expand down by 5
tmux resize-pane -U 5 # Expand up by 5
tmux resize-pane -L 10 # Expand left by 10
tmux resize-pane -R 10 # Expand right by 10
Tip: Adding Vi-style resize bindings is convenient.
bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5The
-rflag means repeat — you can press the key consecutively without prefix for repeated execution.
5.4 Pane Zoom
Expand a specific pane to full screen or restore it to its original size.
<prefix> z # Toggle current pane zoom (full screen <-> original size)
When zoomed, Z appears next to the window name in the status bar. Very useful when examining logs closely or editing code intensively.
5.5 Moving and Swapping Panes
<prefix> { # Move current pane to previous position
<prefix> } # Move current pane to next position
<prefix> Ctrl-o # Rotate all panes counter-clockwise
<prefix> Alt-o # Rotate all panes clockwise
# Swap specific panes
tmux swap-pane -s 0 -t 1
# Move pane to another window (join)
tmux join-pane -t :1 # Move current pane to window 1
tmux join-pane -s :2 -t :1 # Move pane from window 2 to window 1
# Break pane into a separate window
<prefix> ! # Break current pane into new window
# Break pane into new window from command line
tmux break-pane
tmux break-pane -t 1 # Break pane 1 into new window
5.6 Layouts
Tmux provides 5 built-in layouts.
<prefix> Space # Cycle to next layout
<prefix> Alt-1 # even-horizontal (all panes evenly horizontal)
<prefix> Alt-2 # even-vertical (all panes evenly vertical)
<prefix> Alt-3 # main-horizontal (main pane on top, rest on bottom)
<prefix> Alt-4 # main-vertical (main pane on left, rest on right)
<prefix> Alt-5 # tiled (evenly tiled)
Visual representation of each layout:
even-horizontal even-vertical
+------+------+------+ +------------------+
| | | | | Pane 0 |
| P0 | P1 | P2 | +------------------+
| | | | | Pane 1 |
| | | | +------------------+
+------+------+------+ | Pane 2 |
+------------------+
main-horizontal main-vertical
+------------------+ +----------+-------+
| Pane 0 | | | P1 |
| (main) | | Pane 0 +-------+
+--------+---------+ | (main) | P2 |
| P1 | P2 | | +-------+
+--------+---------+ | | P3 |
+----------+-------+
tiled
+---------+---------+
| P0 | P1 |
+---------+---------+
| P2 | P3 |
+---------+---------+
5.7 Closing Panes
<prefix> x # Close current pane (confirmation prompt shown)
# Close pane from command line
tmux kill-pane
tmux kill-pane -t 2 # Close pane 2
# Close all panes except the current one
tmux kill-pane -a
Or type exit in the pane or press Ctrl-d to close it.
5.8 Marking/Unmarking Panes
# Mark pane (toggle)
<prefix> m # Toggle mark on current pane
# Swap marked pane with current pane
tmux swap-pane
6. Copy Mode
Copy mode lets you scroll through, search, and copy terminal output content. It is one of Tmux's hidden powerful features.
6.1 Entering and Exiting Copy Mode
<prefix> [ # Enter copy mode
q # Exit copy mode (or Esc)
6.2 Vi vs Emacs Key Bindings
Tmux copy mode supports either Vi or Emacs-style key bindings.
# Set Vi mode in .tmux.conf (strongly recommended)
setw -g mode-keys vi
Key navigation keys in Vi mode:
| Key | Action |
|---|---|
h, j, k, l | Left, down, up, right |
w | Move to next word |
b | Move to previous word |
0 | Move to beginning of line |
$ | Move to end of line |
g | Move to top of buffer |
G | Move to bottom of buffer |
Ctrl-u | Scroll half page up |
Ctrl-d | Scroll half page down |
Ctrl-b | Scroll full page up |
Ctrl-f | Scroll full page down |
6.3 Search
You can search for text within copy mode.
/search_term # Search downward (Vi mode)
?search_term # Search upward (Vi mode)
n # Move to next search result
N # Move to previous search result
In Emacs mode:
Ctrl-s # Incremental search downward
Ctrl-r # Incremental search upward
6.4 Text Selection and Copy
Copy flow in Vi mode:
1. <prefix> [ # Enter copy mode
2. Navigate to start point with movement keys
3. Space # Begin selection
4. Navigate to end point with movement keys
5. Enter # Copy selection (saved to tmux buffer)
# Add Vi-style copy/paste bindings (.tmux.conf)
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi r send-keys -X rectangle-toggle
With the above settings applied:
| Key | Action |
|---|---|
v | Start text selection (Visual mode) |
V | Start line-wise selection |
r | Toggle rectangle (block) selection |
y | Copy selected area |
6.5 Paste
<prefix> ] # Paste tmux buffer contents
# List buffers
tmux list-buffers
# View specific buffer contents
tmux show-buffer -b 0
# Save buffer to file
tmux save-buffer -b 0 ~/buffer.txt
# Load file contents into buffer
tmux load-buffer ~/content.txt
# Delete buffer
tmux delete-buffer -b 0
6.6 Scrollback Buffer Settings
The default scrollback size is 2000 lines. You can increase it if you need more history.
# .tmux.conf
set -g history-limit 50000
Note: A very large scrollback buffer increases memory usage. 50000 lines is a practical upper limit.
7. Key Binding Customization
7.1 Changing the Prefix Key
If Ctrl-b is uncomfortable, you can change it to another key.
# .tmux.conf - Change to Ctrl-a (GNU Screen style)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Change to Ctrl-Space (recommended)
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
Tip: Changing to
Ctrl-aconflicts with the default shell shortcut for moving to the beginning of the line. In this case, pressingCtrl-atwice sends the originalCtrl-a.
7.2 Adding Key Bindings (bind-key)
# Basic syntax
bind-key [options] key command
# Shorthand
bind key command
# Bind without Prefix (-n flag)
bind -n M-Left select-pane -L # Alt-Left to move to left pane
bind -n M-Right select-pane -R # Alt-Right to move to right pane
bind -n M-Up select-pane -U # Alt-Up to move to upper pane
bind -n M-Down select-pane -D # Alt-Down to move to lower pane
# Repeatable bindings (-r flag)
bind -r h resize-pane -L 5
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
# Preserve current path on split
bind '"' split-window -v -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
7.3 Unbinding Keys (unbind-key)
# Unbind a specific key
unbind-key C-b
# Shorthand
unbind C-b
# Unbind all key bindings (use with caution)
unbind -a
7.4 Viewing Current Key Bindings
<prefix> ? # Show all key binding list
# View from command line
tmux list-keys
tmux list-keys | grep split # Filter specific commands
7.5 Useful Custom Binding Examples
# Instantly reload config file
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
# More intuitive split keys
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Renumber windows
bind R move-window -r \; display-message "Windows renumbered!"
# Synchronize mode toggle (simultaneous input to all panes)
bind S setw synchronize-panes \; display-message "Sync #{?synchronize-panes,ON,OFF}"
# Session selection shortcut
bind C-s choose-session
# Run lazygit in popup window (tmux 3.2+)
bind g display-popup -E -w 80% -h 80% "lazygit"
# Run htop in popup window
bind t display-popup -E -w 80% -h 80% "htop"
8. .tmux.conf Configuration Guide
The ~/.tmux.conf file is the configuration file automatically loaded when Tmux starts. Through this file, you can customize nearly all Tmux behavior.
8.1 Recommended Basic Settings
# ~/.tmux.conf
# -------------------------------------------------
# Basic Settings
# -------------------------------------------------
# Change Prefix to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Start indexes from 1 (0 key is at the far right of keyboard, inconvenient)
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when closing
set -g renumber-windows on
# History size
set -g history-limit 50000
# Reduce escape time (for Vim users)
set -sg escape-time 0
# Repeat key input wait time
set -g repeat-time 600
# Enable focus events (for Vim/Neovim integration)
set -g focus-events on
# Reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
8.2 Mouse Support
# Enable mouse support (tmux 2.1+)
set -g mouse on
# What you can do with the mouse:
# - Click panes to switch focus
# - Drag pane borders to resize
# - Scroll wheel to browse history
# - Drag text to enter copy mode and select
Tip: Enabling the mouse may cause Tmux to intercept the terminal's native text selection. To copy directly to the system clipboard, hold
Shiftwhile selecting with the mouse.
8.3 Vi Mode Settings
# Use Vi key bindings in copy mode
setw -g mode-keys vi
# Vi-style copy
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi V send-keys -X select-line
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi r send-keys -X rectangle-toggle
bind -T copy-mode-vi Escape send-keys -X cancel
# Vi mode for status line commands
set -g status-keys vi
8.4 Status Bar Customization
# -------------------------------------------------
# Status Bar Settings
# -------------------------------------------------
# Status bar position (top or bottom)
set -g status-position bottom
# Status bar refresh interval (seconds)
set -g status-interval 5
# Status bar colors
set -g status-style 'bg=#1e1e2e,fg=#cdd6f4'
# Left status bar
set -g status-left-length 50
set -g status-left '#[fg=#1e1e2e,bg=#89b4fa,bold] #S #[fg=#89b4fa,bg=#1e1e2e] '
# Right status bar
set -g status-right-length 100
set -g status-right '#[fg=#585b70]| #[fg=#cdd6f4]%Y-%m-%d #[fg=#585b70]| #[fg=#cdd6f4]%H:%M #[fg=#89b4fa,bg=#1e1e2e]#[fg=#1e1e2e,bg=#89b4fa,bold] #H '
# Current window style
setw -g window-status-current-format '#[fg=#1e1e2e,bg=#a6e3a1,bold] #I:#W#{?window_zoomed_flag, Z,} '
# Inactive window style
setw -g window-status-format '#[fg=#585b70] #I:#W '
# Window list alignment
set -g status-justify left
8.5 Color Settings (256 Color, True Color)
# 256 color support
set -g default-terminal "screen-256color"
# True Color (24-bit) support
set -ga terminal-overrides ",xterm-256color:Tc"
# or for alacritty
set -ga terminal-overrides ",alacritty:Tc"
# Pane border colors
set -g pane-border-style 'fg=#585b70'
set -g pane-active-border-style 'fg=#89b4fa'
# Message style
set -g message-style 'fg=#cdd6f4,bg=#1e1e2e,bold'
# Copy mode highlight color
setw -g mode-style 'fg=#1e1e2e,bg=#f5c2e7,bold'
8.6 Clipboard Integration
Settings to synchronize text copied within Tmux with the system clipboard.
# macOS (pbcopy/pbpaste)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# Linux (xclip)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# Linux (xsel)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel --clipboard --input"
# Linux (wl-copy, Wayland)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
# Cross-platform auto-detection
if-shell "uname | grep -q Darwin" {
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
} {
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
}
8.7 Complete .tmux.conf Example
A complete configuration integrating all recommended settings.
# ===============================================================
# ~/.tmux.conf - Production-Optimized Configuration
# ===============================================================
# --- Prefix -------------------------------------------------------
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# --- Basic Settings -----------------------------------------------
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 50000
set -sg escape-time 0
set -g repeat-time 600
set -g focus-events on
set -g mouse on
setw -g mode-keys vi
set -g status-keys vi
# --- Colors -------------------------------------------------------
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# --- Key Bindings -------------------------------------------------
# Reload config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Intuitive splits (preserve current path)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
unbind '"'
unbind %
# Vi-style pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resize
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Alt + arrow for prefix-less pane navigation
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift + arrow for window switching
bind -n S-Left previous-window
bind -n S-Right next-window
# Synchronize toggle
bind S setw synchronize-panes \; display "Sync #{?synchronize-panes,ON,OFF}"
# --- Copy Mode ----------------------------------------------------
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi V send-keys -X select-line
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi r send-keys -X rectangle-toggle
# --- Status Bar ---------------------------------------------------
set -g status-position bottom
set -g status-interval 5
set -g status-style 'bg=#1e1e2e,fg=#cdd6f4'
set -g status-left-length 50
set -g status-left '#[fg=#1e1e2e,bg=#89b4fa,bold] #S #[default] '
set -g status-right '#[fg=#cdd6f4]%Y-%m-%d %H:%M #[fg=#1e1e2e,bg=#89b4fa,bold] #H '
setw -g window-status-current-format '#[fg=#1e1e2e,bg=#a6e3a1,bold] #I:#W#{?window_zoomed_flag, Z,} '
setw -g window-status-format '#[fg=#585b70] #I:#W '
# --- Pane Borders -------------------------------------------------
set -g pane-border-style 'fg=#585b70'
set -g pane-active-border-style 'fg=#89b4fa'
9. Plugins
9.1 TPM (Tmux Plugin Manager)
TPM is the standard tool for managing Tmux plugins.
Installation:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Add to .tmux.conf:
# Plugin list
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
# TPM initialization (must be at the very end of .tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Plugin management keys:
<prefix> I # Install plugins
<prefix> U # Update plugins
<prefix> Alt-u # Remove unused plugins (Uninstall)
9.2 tmux-sensible
A plugin that sets sensible defaults. Applies universally useful settings at once.
set -g @plugin 'tmux-plugins/tmux-sensible'
9.3 tmux-resurrect
A plugin that can save and restore Tmux sessions to the filesystem. Perfectly restores session structure even after system restarts.
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Vim session restoration (optional)
set -g @resurrect-strategy-vim 'session'
# Neovim session restoration (optional)
set -g @resurrect-strategy-nvim 'session'
# Restore pane contents
set -g @resurrect-capture-pane-contents 'on'
Usage:
<prefix> Ctrl-s # Save session
<prefix> Ctrl-r # Restore session
9.4 tmux-continuum
A plugin that automates tmux-resurrect's save/restore.
set -g @plugin 'tmux-plugins/tmux-continuum'
# Auto-save every 15 minutes
set -g @continuum-save-interval '15'
# Auto-restore on Tmux server start
set -g @continuum-restore 'on'
# Auto-start Tmux on system boot (macOS)
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
9.5 tmux-yank
A plugin that automatically handles system clipboard integration.
set -g @plugin 'tmux-plugins/tmux-yank'
# Keep copy mode after copying (default exits)
set -g @yank_action 'copy-pipe'
9.6 Other Recommended Plugins
| Plugin | Description |
|---|---|
tmux-plugins/tmux-prefix-highlight | Highlight status bar when prefix key is pressed |
tmux-plugins/tmux-pain-control | Improved consistency for pane management bindings |
tmux-plugins/tmux-sessionist | Extended session management commands |
tmux-plugins/tmux-open | Open URLs and file paths from copy mode |
tmux-plugins/tmux-fpp | Quick file path opening with Facebook PathPicker |
catppuccin/tmux | Catppuccin theme |
dracula/tmux | Dracula theme |
wfxr/tmux-fzf-url | URL selection and opening with fzf |
10. Advanced Features
10.1 send-keys: Sending Commands to Panes
send-keys is a powerful feature that programmatically sends key input to specific panes.
# Send command to current pane
tmux send-keys "ls -la" Enter
# Send to a specific session, window, and pane
tmux send-keys -t dev:1.0 "npm start" Enter
# Send Ctrl-c (interrupt running process)
tmux send-keys -t dev:1.0 C-c
# Send multiple keys in sequence
tmux send-keys -t dev:1.0 "cd ~/project" Enter "git status" Enter
Target specification syntax:
session:window.pane
dev:1.0 # dev session, window 1, pane 0
:2.1 # current session, window 2, pane 1
monitoring: # monitoring session, current window
10.2 Tmux Scripting
All Tmux commands can be used in shell scripts to set up complex development environments at once.
#!/bin/bash
# dev-env.sh - Development environment auto-setup script
SESSION="dev"
PROJECT_DIR="$HOME/workspace/my-project"
# Kill existing session if it exists
tmux kill-session -t $SESSION 2>/dev/null
# Create new session (detached mode, first window name: editor)
tmux new-session -d -s $SESSION -n editor -c $PROJECT_DIR
# Run Neovim in editor window
tmux send-keys -t $SESSION:editor "nvim ." Enter
# Create server window
tmux new-window -t $SESSION -n server -c $PROJECT_DIR
tmux send-keys -t $SESSION:server "npm run dev" Enter
# Create logs window (horizontal split)
tmux new-window -t $SESSION -n logs -c $PROJECT_DIR
tmux send-keys -t $SESSION:logs "tail -f logs/app.log" Enter
tmux split-window -v -t $SESSION:logs -c $PROJECT_DIR
tmux send-keys -t $SESSION:logs.1 "tail -f logs/error.log" Enter
# Create test window
tmux new-window -t $SESSION -n test -c $PROJECT_DIR
tmux send-keys -t $SESSION:test "npm test -- --watch" Enter
# Create git window
tmux new-window -t $SESSION -n git -c $PROJECT_DIR
tmux send-keys -t $SESSION:git "git status" Enter
# Move to first window
tmux select-window -t $SESSION:editor
# Attach to session
tmux attach -t $SESSION
10.3 tmuxinator: YAML-Based Session Automation
tmuxinator is a tool that defines Tmux session layouts in YAML files and creates them all at once.
Installation:
# Install via Ruby gem
gem install tmuxinator
# macOS
brew install tmuxinator
Usage:
# Start project
tmuxinator start my-project
# Shorthand
mux my-project
# Stop project
tmuxinator stop my-project
10.4 display-popup (Tmux 3.2+)
Popup windows allow you to perform temporary tasks in a floating window.
# Default popup (auto-closes on exit)
tmux display-popup
# Specify size and position
tmux display-popup -w 80% -h 60% -x C -y C
# Command execution popup
tmux display-popup -E "htop"
tmux display-popup -E -w 90% -h 90% "lazygit"
# Register popup as key binding
bind g display-popup -E -w 80% -h 80% "lazygit"
bind f display-popup -E -w 60% -h 60% "fzf --preview 'cat {}' | xargs nvim"
11. Practical Use Scenarios
11.1 Session Persistence During SSH Remote Work
This is Tmux's most essential use case. Sessions persist on the server even if the SSH connection drops.
# 1. Connect to remote server
ssh user@remote-server
# 2. Start Tmux session
tmux new -s work
# 3. Perform work (build, deploy, monitoring, etc.)
make build && make deploy
# 4. SSH connection drops or intentional detach
# <prefix> d or network disconnect
# 5. Reconnect and resume session
ssh user@remote-server
tmux attach -t work
# All work is preserved exactly as you left it!
11.2 Pair Programming
Tmux's client-server architecture enables multiple users to connect to the same session and work on the same screen in real time.
Method 1: Shared user account
# Developer A: Create session
tmux new -s pair
# Developer B: SSH to same server and attach to session
tmux attach -t pair
# Both developers share the same screen in real-time
Method 3: tmate (Tmux-based remote sharing)
# Install tmate
brew install tmate # macOS
sudo apt install tmate # Ubuntu
# Start tmate session
tmate
# Connection URL is displayed
# SSH: ssh xxxxx@lon1.tmate.io
# Web: https://tmate.io/t/xxxxx
11.3 Synchronize Panes Mode
Useful when you need to run the same command on multiple servers simultaneously.
# Enable/disable synchronize mode
<prefix> :setw synchronize-panes on
<prefix> :setw synchronize-panes off
12. Tmux vs Screen vs Zellij Comparison
| Feature | Tmux | GNU Screen | Zellij |
|---|---|---|---|
| Release | 2007 | 1987 | 2021 |
| Language | C | C | Rust |
| Architecture | Client-server | Single process | Client-server (WebAssembly plugins) |
| Vertical Split | Built-in | Patch needed (4.0+ built-in) | Built-in |
| Mouse Support | Configuration needed | Limited | Enabled by default |
| Scripting | Powerful | Limited | WASM plugins |
| Status Bar | Highly customizable | Limited | Built-in, tab-bar style |
| Plugin Ecosystem | TPM (active) | Almost none | WASM plugins (growing) |
| Learning Curve | Medium | Low | Low (intuitive UI) |
| Server Deployment | Pre-installed on most | Pre-installed on most | Requires separate installation |
Conclusion:
- Tmux: The most versatile and powerful, the de facto standard in server environments. Productivity maximizes as you gain proficiency.
- Screen: Only recommended when already installed on legacy servers. No reason to choose it for new projects.
- Zellij: A modern Rust-based alternative with intuitive UI and built-in layouts. However, adoption in server environments is still limited.
13. Cheat Sheet: Top 40 Most-Used Commands
13.1 Session Commands
| # | Command / Key Binding | Description |
|---|---|---|
| 1 | tmux new -s name | Create new session with name |
| 2 | tmux ls | List sessions |
| 3 | tmux a -t name | Attach to specific session |
| 4 | tmux new -A -s name | Attach if exists, create if not |
| 5 | <prefix> d | Detach from current session |
| 6 | <prefix> $ | Rename current session |
| 7 | <prefix> s | Select and switch from session list |
| 8 | tmux kill-session -t name | Kill specific session |
| 9 | tmux kill-server | Kill entire Tmux server |
| 10 | <prefix> ( / <prefix> ) | Switch to previous/next session |
13.2 Window Commands
| # | Command / Key Binding | Description |
|---|---|---|
| 11 | <prefix> c | Create new window |
| 12 | <prefix> , | Rename current window |
| 13 | <prefix> n / <prefix> p | Move to next/previous window |
| 14 | <prefix> 0-9 | Jump directly to window number |
| 15 | <prefix> w | Interactive window selection |
| 16 | <prefix> l | Toggle to last used window |
| 17 | <prefix> & | Close current window |
| 18 | <prefix> f | Search by window name |
| 19 | tmux move-window -r | Renumber windows |
| 20 | tmux swap-window -t N | Swap current window with window N |
13.3 Pane Commands
| # | Command / Key Binding | Description |
|---|---|---|
| 21 | <prefix> % | Vertical split (left-right) |
| 22 | <prefix> " | Horizontal split (top-bottom) |
| 23 | <prefix> Arrow keys | Navigate panes with arrow keys |
| 24 | <prefix> o | Cycle to next pane |
| 25 | <prefix> z | Toggle pane zoom (full screen) |
| 26 | <prefix> x | Close current pane |
| 27 | <prefix> ! | Break current pane into new window |
| 28 | <prefix> q | Show pane numbers |
| 29 | <prefix> { / <prefix> } | Move pane to previous/next position |
| 30 | <prefix> Space | Cycle through layouts |
| 31 | <prefix> Ctrl-Arrow | Resize pane by 1 cell |
| 32 | <prefix> Alt-Arrow | Resize pane by 5 cells |
13.4 Copy Mode and Other Commands
| # | Command / Key Binding | Description |
|---|---|---|
| 33 | <prefix> [ | Enter copy mode |
| 34 | <prefix> ] | Paste buffer contents |
| 35 | <prefix> ? | View key binding list |
| 36 | <prefix> : | Open command prompt |
| 37 | <prefix> t | Show current time |
| 38 | <prefix> ~ | View message history |
| 39 | tmux source ~/.tmux.conf | Reload configuration file |
| 40 | tmux display-popup -E "cmd" | Run command in popup window |
14. Troubleshooting
14.1 Colors Not Displaying Correctly
# Problem: Vim/Neovim colors are broken inside Tmux
# Solution: Add to .tmux.conf
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
14.2 ESC Delay in Neovim
# Problem: Neovim's ESC response is slow inside Tmux
# Solution: Add to .tmux.conf
set -sg escape-time 0
14.3 Mouse Scroll Not Working
# Solution: Enable mouse support
set -g mouse on
14.4 Korean/CJK Input Broken
# Solution: Verify UTF-8 settings
# Check terminal locale settings
locale
# Should show LANG=ko_KR.UTF-8 or en_US.UTF-8
# Add to .bashrc or .zshrc
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
15. Conclusion: Tmux Learning Roadmap
Tmux has an initial learning curve, but once it becomes second nature, terminal work productivity improves dramatically. The following roadmap is recommended for gradual learning.
Level 1 (Day 1)
+-- tmux new / attach / detach / ls / kill-session
+-- <prefix> c / n / p (window create/switch)
+-- <prefix> % / " (pane split)
Level 2 (Week 1)
+-- Pane navigation (<prefix> arrow keys)
+-- Pane zoom (<prefix> z)
+-- Copy mode (<prefix> [)
+-- Basic .tmux.conf settings
Level 3 (Week 2)
+-- Custom key bindings
+-- Status bar customization
+-- Clipboard integration
+-- Mouse settings
Level 4 (Month 1)
+-- TPM plugin system
+-- tmux-resurrect / continuum
+-- send-keys scripting
+-- tmuxinator / tmuxp session automation
Level 5 (Continuous improvement)
+-- display-popup usage
+-- Synchronize panes mode
+-- Nested Tmux operation
+-- Pair programming session sharing
Tmux is not just a terminal tool — it is an infrastructure tool that forms the foundation of server management, development workflows, and remote collaboration. By practicing the commands covered in this guide one by one and building your own .tmux.conf, every minute spent at the terminal will become more efficient.
Quiz
Q1: What is the main topic covered in "The Complete Tmux Command Guide: Every Command to 10x Your Productivity with a Terminal Multiplexer"?
From Tmux session/window/pane concepts to key bindings, copy mode, plugins, custom configuration (.tmux.conf), pair programming, and SSH remote work — a comprehensive guide to every Tmux command with practical examples.
Q2: What are the key steps for Installation and Basic Concepts?
2.1 Installation Installation methods by operating system: Verify installation: 2.2 Core Hierarchy: Session > Window > Pane To understand Tmux's architecture, you must grasp three layers. 2.3 Prefix Key Concept Tmux uses a Prefix Key for all key bindings. The default is Ctrl-b.
Q3: Explain the core concept of Session Management.
Sessions are the top-level work unit in Tmux. Manage work contexts by separating sessions per project or purpose. 3.1 Creating Sessions 3.2 Listing Sessions You can also view the session list from within Tmux.
Q4: What are the key aspects of Window Management?
Windows function like tabs within a session. The window list is displayed in the bottom status bar. 4.1 Creating Windows 4.2 Renaming Windows 4.3 Switching Windows 4.4 Moving and Reordering Windows 4.5 Closing Windows 4.6 Listing Windows
Q5: How does Pane Management work?
Panes split windows to place multiple terminals on one screen. This is Tmux's most powerful and frequently used feature. 5.1 Splitting Panes 5.2 Pane Navigation 5.3 Resizing Panes 5.4 Pane Zoom Expand a specific pane to full screen or restore it to its original size.