tmux 설치하기, 명령어 정리
tmux 설치하기
- CentOS
- sudo yum install epel-release
sudo yum install -y tmux
- sudo yum install epel-release
- Ubuntu
- sudo apt-get install tmux
tmux 명령어
1. tmux 세션 생성하기
[root@localhost soyeon]# tmux
2. tmux 세션에서 빠져 나오기
가상 콘솔 안에서 ctrl + b -> d
3. tmux 세션 리스트 보기
[root@localhost soyeon]# tmux ls
0: 1 windows (created Thu Apr 23 17:22:26 2020) [270x24]
1: 1 windows (created Thu Apr 23 18:56:12 2020) [270x24]
4. tmux 리스트 중 0번 세션 활성화 시키기
[root@localhost soyeon]# tmux a -t 0
5. tmux 특정 세션 종료시키기
[root@dl380-02 soyeon]# tmux ls
0: 1 windows (created Thu Apr 23 17:22:26 2020) [270x24]
2: 1 windows (created Thu Apr 23 19:13:12 2020) [270x24]
[root@dl380-02 soyeon]# tmux kill-session -t 2
[root@dl380-02 soyeon]# tmux ls
0: 1 windows (created Thu Apr 23 17:22:26 2020) [270x24]
6. tmux 세션 이름 정해서 생성하기
[root@dl380-02 soyeon]# tmux new -s soyeon
[detached]
[root@dl380-02 soyeon]# tmux ls
1: 1 windows (created Thu Apr 23 20:19:27 2020) [270x55]
soyeon: 1 windows (created Fri Apr 24 11:18:22 2020) [270x20]
7. tmux 세션 안에서 구역 나누기
위아래로 나누기 : Ctrl + b -> "
양옆으로 나누기 : Ctrl + b -> %
구역간 이동 : Ctrl + b -> 위/아래 방향키
방향키로 스크롤 업/다운 : Ctrl + b -> [ (종료 시, q 입력)