사용자 도구

사이트 도구


linux:tmux

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
linux:tmux [2016/06/07 16:23]
kwon37xi
linux:tmux [2023/08/10 13:36] (현재)
kwon37xi [tmux]
줄 1: 줄 1:
 ====== tmux ====== ====== tmux ======
   * http://tmux.sourceforge.net/   * http://tmux.sourceforge.net/
-  * https://github.com/erikw/tmux-powerline+  * [[linux:tmux:tpm|tpm - tmux plugin manager]] 
 +  * [[https://github.com/tmux-plugins|tmux-plugins]] 
 +  * [[https://www.howtogeek.com/671422/how-to-use-tmux-on-linux-and-why-its-better-than-screen/|How to Use tmux on Linux (and Why It’s Better Than Screen)]] ''tmux'' 기본을 살펴보기 좋은 글
   * [[http://net.tutsplus.com/tutorials/tools-and-tips/intro-to-tmux/|Intro to Tmux]]   * [[http://net.tutsplus.com/tutorials/tools-and-tips/intro-to-tmux/|Intro to Tmux]]
-  * [[http://blog.outsider.ne.kr/1167|Tmuxinator]] +  * [[linux:tmux:tmuxinator|tmuxinator]] 
 +  * [[linux:tmux:xpanes|tmux-xpanes]] 
 +  * [[linux:byobu|byobu]] 
 +  * [[linux:tmux:tmuxifier|tmuxifier]] 
 +  * [[https://github.com/creaktive/rainbarf|creaktive/rainbarf: it's like Rainmeter, but for CLI!]] 
 +  * [[https://github.com/rothgar/awesome-tmux|awesom-tmux]]
 ===== 단축키 ===== ===== 단축키 =====
 ==== 기본 단축키 변경 ==== ==== 기본 단축키 변경 ====
-  * ''<Ctrl-b>'' : 기본 단축키 +  * ''<Ctrl-b>'' : 기본 단축키, 손가락이 아픈 위치임. 
-  * ''~/.tmux.conf'' 파일 [[http://askubuntu.com/questions/173174/tmux-key-binding-issue|Tmux Key Binding Issue]]<code>+  * ''<Ctrl-a>''로 변경하자 - ''~/.tmux.conf'' 파일 [[http://askubuntu.com/questions/173174/tmux-key-binding-issue|Tmux Key Binding Issue]]<code>
 unbind C-b unbind C-b
-set -g prefix C-a +set -g prefix C-a # Ctrl-a 자체를 발생시킨다. 
-bind-key a send-prefix+bind-key C-a send-prefix 
 +</code> 
 +  * 설정 다시 읽기<code> 
 +source-file ~/.tmux.conf 
 +</code> 
 + 
 +==== 명령입력 ==== 
 +  * ''<prefix>:'' : 명령행 나옴 
 + 
 +==== 단축키 목록 ==== 
 +  * ''<prefix>?'' : 전체 단축키 목록 
 + 
 +==== 동시입력 ==== 
 +  * 여러 터미널에 명령 동시입력 
 +  * ''setw synchronize-panes on'' 명령 ''off''로 바꾸면 명령 동시 입력 해제 ''on/off'' 없이 그냥 하면 toggle 
 +  * ''~/.tmux.conf''에 할당 ''<prefix>y'' <code> 
 +bind-key y set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
 </code> </code>
  
 +==== Zoom ====
 +  * ''<prefix>z'' : 특정 pane 최대화 toggle
 ==== Pane ==== ==== Pane ====
-  * ''<Ctrl-b>%'' : 세로 Pane 열기 +  * ''<prefix>%'' : 세로 Pane 열기 
-  * ''<Ctrl-b>"'' : 가로 Pane 열기 +  * ''<prefix>%%"%%'' : 가로 Pane 열기 
-  * ''<Ctrl-b>[Up, Down, Right, Left]'' : 열린 Pane들간 이동 +  * ''<prefix>[Up, Down, Right, Left]'' : 열린 Pane들간 이동 
-  * ''<Ctrl-b>;'' : 이전 으로 가기 +  * ''<prefix>;'' : 이전 pane으로 가기 
-  * ''<Ctrl-b><Ctrl-o>'' : 현재 Pane 위치 이동 +  * ''<prefix><Ctrl-o>'' : 현재 Pane 위치 이동 
-  * ''<Ctrl-b><Ctrl-Up[Down][Left][Right]>'' : Pane 크기 조정 1칸씩 +  * ''<prefix>z'' : Zoom Toggle. 현재 pane 창을 최대화하거나 최대화를 취소한다. 
-  * ''<Ctrl-b><Meta-Up[Down][Left][Right]>'' : Pane 크기 조정 5칸씩 +  * ''<prefix><Ctrl-Up[Down][Left][Right]>'' : Pane 크기 조정 1칸씩 
-  * ''<Ctrl-b>x'' : 닫기+  * ''<prefix><Meta-Up[Down][Left][Right]>'' : Pane 크기 조정 5칸씩 
 +  * ''<prefix>x'' : 닫기 
 +  * ''<prefix>{'' ''(:swap-pane -L)'' : 현재 Pane 왼쪽(위쪽?)으로 이동 
 +  * ''<prefix>}'' ''(:swap-pane -R)'' : 현재 Pane 오른쪽(아래쪽?)으로 이동 
 +  * ''<prefix>q'' : pane 번호를 보여줌. 이 순간 번호를 누르면 해당 페인으로 이동 
 +  * ''<prefix>!'' : pane 을 새 창(window)로 보내기 
 +    * [[https://superuser.com/questions/600286/move-pane-to-a-new-window-in-tmux|Move pane to a new window in tmux - Super User]]
  
 ==== Window ====  ==== Window ====
-  * ''<Ctrl-b>c'' : 새 창 +  * ''<prefix>c'' : 새 창 
-  * ''<Ctrl-b>n'' : 다음 창 +  * ''<prefix>n'' : 다음 창 
-  * ''<Ctrl-b>p'' : 이전 창 +  * ''<prefix>p'' : 이전 창 
-  * ''<Ctrl-b>w'' : 창 선택 +  * ''<prefix>w'' : 창 선택 
-  * ''<Ctrl-b>&'' : 창 닫기+  * ''<prefix>f'' : 이름으로 창 찾기 
 +  * ''<prefix>&'' : 창 닫기 
 +  * Window title 변경 : [[https://til.hashrocket.com/posts/18b63da9d2-rename-tmux-windows|Rename Tmux Windows - Today I Learned]] 
 +    * 명령모드로 가서 ''rename-window <새이름>'' 
 +    * ''<prefix>, <새이름>''
  
 ==== Scroll ==== ==== Scroll ====
   * ''<Prefix>['' : 스크롤시작   * ''<Prefix>['' : 스크롤시작
-  * ''<ESC>'' : 스크롤 종료+  * ''<ESC>'' 혹은 ''q'' : 스크롤 종료
  
 +==== sessions ====
 +  * ''tmux ls'' : 세션 목록
 +  * ''tmux attach -t <sessionname>'', ''tmux a -t <sessionname>'' : 세션 붙기
 +  * ''tmux kill-session -t <ID>''
 +  * '':choose-tree'', ''<prefix>w'' : 전체 session과 window 목록을 보고 선택할 수 있다.
 +  * ''<prfix>d'' : 세션에서 나오기
 +  * ''<prefix>$'' : session 이름 변경
 +==== Copy Mode ====
 +  * ''<prefix>['' 로 복사 모드로 들어감.
 +  * [[https://www.youtube.com/watch?v=aeHepunmwUQ|tmux에서 복사 및 붙여넣기 - YouTube]]
 +  * vi 모드로 설정
 +<code>
 +setw -g mode-keys vi
 +</code>
 +  * ''g'',''G'', '':줄번호'' 등이 작동함
 +  * ''<Space>'' : 영역 선택시작
 +  * ''<Enter>'' : 영역 복사
 +  * ''y'' : vertical 영역 선택
  
 ==== tmux powerline ==== ==== tmux powerline ====
-  * https://github.com/erikw/tmux-powerline+  * [[linux:powerline|Powerline]]에서 ''tmux''도 지원함.
  
 ==== 버그 ==== ==== 버그 ====
   * [[https://github.com/Lokaltog/powerline/issues/372|Powerline과 함께 사용시 alias 분리되는 현상]]   * [[https://github.com/Lokaltog/powerline/issues/372|Powerline과 함께 사용시 alias 분리되는 현상]]
 +
 +===== 내 핵심 설정 =====
 +  * [[https://gist.github.com/tsl0922/d79fc1f8097dde660b34|.tmux.conf]] ''.tmux.conf'' 예제. vi mode
 +  * [[https://www.rockyourcode.com/copy-and-paste-in-tmux/|Copy and Paste in Tmux :: rockyourcode]] : linux에서 copy & paste
 +
 +===== vim-tmux-navigator =====
 +  * [[https://github.com/christoomey/vim-tmux-navigator|vim-tmux-navigator]]
 +  * [[:vim|Vim]] 과 함께 사용하면서 ''Ctrl-hjkl'' 로 pane(vim 에서는 window) 전환을 하고자 할 때 사용.
  
 ==== 읽어보기 ==== ==== 읽어보기 ====
줄 52: 줄 112:
   * [[https://www.cheatography.com/bechtold/cheat-sheets/tmux-the-terminal-multiplexer/|tmux the terminal multiplexer Cheat Sheet]]   * [[https://www.cheatography.com/bechtold/cheat-sheets/tmux-the-terminal-multiplexer/|tmux the terminal multiplexer Cheat Sheet]]
   * [[http://haruair.com/blog/3610|tmux에서 열려 있는 모든 pane 동시 입력하기 - Haruair]]   * [[http://haruair.com/blog/3610|tmux에서 열려 있는 모든 pane 동시 입력하기 - Haruair]]
 +  * [[http://www.deanbodenham.com/learn/tmux-conf-file.html|tmux: making a conf file - Statistically Irrelevant]]
 +  * [[http://blog.b1ue.sh//2016/10/10/tmux-tutorial/|터미널 멀티플렉서 tmux를 배워보자 · Bluesh]]
 +  * [[https://leimao.github.io/blog/Tmux-Tutorial/|Lei Mao's Log Book – Tmux Tutorial]]
 +
 +  * [[https://sanctum.geek.nz/arabesque/vi-mode-in-tmux/|Vi mode in tmux | Arabesque]]
 +  * [[https://sanctum.geek.nz/arabesque/zooming-tmux-panes/|Zooming tmux panes | Arabesque]]
 +  * [[https://sanctum.geek.nz/arabesque/sync-tmux-panes/|Sync tmux panes | Arabesque]]
 +  * [[https://www.tecmint.com/tips-for-tmux-terminal-sessions/|5 Useful Tips for Better Tmux Terminal Sessions]]
 +  * [[https://www.xspdf.com/resolution/53017896.html|Getting back old copy paste behaviour in tmux, with mouse]]
 +  * [[http://tmuxcheatsheet.com/|Tmux Cheat Sheet & Quick Reference]]
 +  * [[https://www.youtube.com/playlist?list=PLT98CRl2KxKGiyV1u6wHDV8VwcQdzfuKe|Getting Started with tmux - YouTube]]
linux/tmux.1465286008.txt.gz · 마지막으로 수정됨: 2016/06/07 16:23 저자 kwon37xi