Skip to content

Instantly share code, notes, and snippets.

@mohok
Forked from LeoHeo/tmux command basic.md
Created January 27, 2021 22:38
Show Gist options
  • Select an option

  • Save mohok/dcbb3960eda0535b2995cbb2f360ed70 to your computer and use it in GitHub Desktop.

Select an option

Save mohok/dcbb3960eda0535b2995cbb2f360ed70 to your computer and use it in GitHub Desktop.

Revisions

  1. @LeoHeo LeoHeo revised this gist May 29, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions tmux command basic.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Tmux Command

    mac 기준으로 Tmux 설치부터 기본적인 명령어를 알아가고자 한다.
    Tutorial용으로 참고할만한 블로그는 아래와같다.
    mac 기준으로 Tmux 설치부터 기본적인 명령어를 알아가고자 한다.<br>
    Tutorial용으로 참고할만한 블로그는 아래와같다.<br>
    [Tmux-Part1](http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/)
    [Tmux-Part2](http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/)

  2. @LeoHeo LeoHeo created this gist May 29, 2016.
    84 changes: 84 additions & 0 deletions tmux command basic.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,84 @@
    # Tmux Command

    mac 기준으로 Tmux 설치부터 기본적인 명령어를 알아가고자 한다.
    Tutorial용으로 참고할만한 블로그는 아래와같다.
    [Tmux-Part1](http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/)
    [Tmux-Part2](http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/)


    ## 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
    ```