IT Study/AWS & Server, Network

[Linux] 나를 위한 tmux 핵심 사용법

ITguny 2022. 1. 14. 21:46

1. tmux 설치

# Amazon Linux 2
yum install -y tmux

# Ubuntu
apt install -y tmux

 

2. 자주 쓰는 명령어

2-1. 세션 관련 명령어

 

# tmux session create
tmux 

# tmux session create(set session_name)
tmux -new -s <session_name>

# tmux session out
Ctrl+b, d

# tmux session exit
exit

# tmux session attach
tmux attach-session -t <session_name>

# tmux session list
tmux ls

2-2. 그 외 명령어

# 세션을 상하로 분리함
Ctrl+b, "

# 세션을 좌우로 분리함 
Ctrl+b, %

# 분리된 윈도우 간의 이동
Ctrl+b, <방향키(상하좌우)>