20년가까이 screen를 사용하다가 최근 tmux 를 알게 되었다. screen은 세션을 복구하거나, 이전 윈도우 크기 복구 불가능 등 여러 불편한 점이 있었다. tmux는 이러한 문제를 개선은 새로운 툴로 여러 편의성을 제공하고 있어, 추천할 만 하다. tmux 설치하기 $> sudo apt install tmux # for linux $> brew install tmux # for mac 세션 관련 명령어 새로운 세션 만들기 tmux new 또는 tmux new -s "세션명" 세션명 변경하기 [ctrl] + b, $ 세션 detach [ctrl] + b, d 세션 list $> tmux ls 세션 attach $> tmux attach -t "session name" $> tmux attach -t 번호 # 세션명이 없는 경우, 세션 번호가 부여된 경우 세션 강제 종료, 터미널에서 $> tmux kill-session -t "session name" 가급적이면, 세션 내부에서 종료하는 게 좋음 세션 간 이동 <Ctrl> + b , ( 이전 세션으로 전황 <Ctrl> + b + ) 다음 세션으로 전황 이 기능이 screen 대시 강력함 세션 내부 윈도우 관련 명령어 무명 윈도우 생성 [ctrl] + b, c 윈도우 이름 변경 [ctrl] + b, , 윈도우 종료 [ctrl] + b, & --> 가급적이면 이것을 사용할 것 [ctrl] + d 는 종종 실수를 함. [ctrl] + d 다음 윈도우로 이동 [ctrl] + b, n 이전 윈도우로 이동 [ctrl] + b, p 직전 윈도우로 이동 [ctrl] + b, l 특정 윈도우로 이동 [ctrl] + b, [0-9] 번호로 윈도우 이동 [ctrl] + b, ' index가 나타날 때, 번호를 누르면 해당 윈도우 전환 전체 윈도우 리스트 [ctrl] + b, w 현재 세션의 윈도...
gnu screen를 약 20년간 사용해 왔다. 하지만 screen은 재시작할 때, 이전 창 사이즈 정보가 불러오지 못 해 putty를 실행할 때마다 다시 창 크기를 변경해야 하는 불편함이 있었다. 그래서 알아보니 tmux 라는 새로운 프로그램을 알게 됐다. 그리고 tmux는 pane이라는 새로운 개념을 도입해서 창 내부에서 분할 창(pane)를 조정할 수 있어서, screen보다 UX/UI 적으로 더 편한 것 같다. 앞으로는 tmux를 사용해야 겠다. 아래는 나의 ~/.tmux.conf 파일 내용이다. #set -g mouse on set -g history-limit 10000 set -g status on set -g status-position bottom set -g status-interval 1 set -g base-index 1 setw -g pane-base-index 1 set -g default-terminal "screen-256color" bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded" # 상태줄 기본 set -g status on set -g status-position bottom set -g status-interval 1 #set -g status-style fg=white,bg=black # 왼쪽 -> 호스트명 set -g status-left '#[fg=black,bg=red,bold] #H #[default]' # 일반 창 #setw -g window-status-format '#[fg=white,bg=black] #I #W ' # 현재 창 setw -g window-status-current-format '#[fg=black,bg=cyan,bold] #I* #W ' # 오른쪽 -> 날짜/시간 set -g status-right '#[fg=black,...