본문 바로가기
Linux/Shell

맥 os - SSH환경에서 화면 분할하기 (tmux)

by Sondho 2021. 1. 22.

brew 설치

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

 

tmux 설치

brew install tmux

 

tmux 명령어

  • tmux a # : attach. 터미널 -> tmux. attach. 터미널 -> tmux. dettach시킨 tmux로 이동
> tmux a #
  • tmux ls : 현재 실행중인 세션 일람
> tmux ls
  • tmux kill-session -t 세션이름 : 세션 강제 종료
> tmux kill-session -t 세션이름

 

tmux 단축키

※ ctrl + b 누른 뒤, 다음 키 눌러야함. 동시에 누르면 안됨.

  • (ctrl + b) -> % : 패널 세로 나누기
  • (ctrl + b) -> " : 패널 가로 나누기
  • (ctrl + b) -> 키보드 상/하/좌/우 : 패널 이동
  • (ctrl + b) -> x : 패널 강제종료
  • (ctrl + b) → s -> 방향키 -> 엔터 : 세션 전환
  • (ctrl + b) -> d : detach. 세션과 터미널 분리. 현재 작업을 보류하고 tmux에서 나옴. tmux -> 터미널

 

참고

https://gist.github.com/ryeonho/7005437

https://gptjs409.github.io/infra/2019/07/29/tmux.html


tmux - alias, sh를 이용하여 편리하게 사용하기

 

tmux - alias, sh를 이용하여 편리하게 사용하기

alias 등록하기 (https://sondho.tistory.com/44) # tmux alias t='tmux' alias tn='~/git/my-settings/my-sh/tmux/tmux_new_name.sh' alias ta='tmux a #' alias tan='~/git/my-settings/my-sh/tmux/tmux_a_t_nam..

sondho.tistory.com

 

'Linux > Shell' 카테고리의 다른 글

man signal (mac os, 파파고 번역)  (0) 2021.02.06
tmux - alias, sh를 이용하여 편리하게 사용하기  (0) 2021.01.22
cut 명령어 옵션  (0) 2020.11.20
tr 명령어 옵션  (0) 2020.11.20
group 명령어  (0) 2020.11.19

댓글