Skip to content

Instantly share code, notes, and snippets.

@LeoHeo
Last active January 17, 2024 12:22
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save LeoHeo/70d191eb629b7e3e3084278e19a73e38 to your computer and use it in GitHub Desktop.
Save LeoHeo/70d191eb629b7e3e3084278e19a73e38 to your computer and use it in GitHub Desktop.
기본적인 tmux 사용법

Tmux Command

mac 기준으로 Tmux 설치부터 기본적인 명령어를 알아가고자 한다.
Tutorial용으로 참고할만한 블로그는 아래와같다.
Tmux-Part1 Tmux-Part2

Install

$ brew install tmux

Command

default는 ctrl+b에 키조합을 한다.

무슨말이냐고 하면 아래와 같다.

e.g)
$ ctrl + b + %
$ ctrl + b + "

create session

$ tmux new -s [name] 

kill session

$ tmux kill-session -t [name]

hide & visible tmux

$ ctrl + b + d      # hide
$ tmux a -t [name]  # visible

Window(Tab)

Window는 터미널에서 탭개념이다.

$ ctrl + b + c # create Window

window move

window간에 서로 이동할때

$ ctrl + b + [window number]

Panes(Split)

Panes는 한 윈도우에서 화면분한을 할때 사용한다.

# horizontal split
#        |
#   1    |    2
#        |
$ ctrl + b + %  
# vertical split
#        1
# ----------------
#        2
$ ctrl + b + "

Panes Move

화면 분할한 상태에서 이동하기

$ ctrl + b + [방향키]

Panes Zoom

특정화면만 확대하기 다시 예전 Panes상태로 돌아오기

$ ctrl + b + z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment