반응형
MacOS에서 Tmux 설치하기
brew install tmux
참고) 오류 해결
설치 중 아래와 같은 오류가 발생하였다.

Error: The following directories are not writable by your user:
/usr/local/share/man/man8
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/share/man/man8
And make sure that your user has write permission.
chmod u+w /usr/local/share/man/man8
검색해보니 최신 MacOS에서 보안이 강화되면서 몇몇 권한이 기본적으로 막히게 변경되었다고 한다.
아래 명령어로 권한을 추가 해준 후 다시 설치를 해준다.
sudo chown -R $(whoami) /usr/local/share/man/man8
💡 -R(--recursive)옵션: 하위 디렉터리까지 변경할 경우 사용
그럼 아래와 같이 설치가 완료된다.
...
==> tmux
Example configuration has been installed to:
/usr/local/opt/tmux/share/tmux
Tmux 주요 명령어
# 신규 세션 생성
tmux new -s <session_name>
# 세션 목록 조회
tmux ls
# 세션 종료
exit
# 세션 다시 불러오기
tmux attach -t <session_name>
# 스크롤하기
ctrl + b + [
# 스크롤 종료
esc
# 좌우로 패널 나누기
ctrl + B, %
# 상하로 패널 나누기
ctrl + B, "
# 오른쪽으로 패널 이동하기
ctrl + b, ←
# 패널 종료
ctrl + d
# 단축키 목록 보기
ctrl + b, ?
# 동시에 여러 화면 조작하기
vi ~/.tmux.conf
bind-key s set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
tmux source-file ~/.tmux.conf
반응형
'Linux' 카테고리의 다른 글
[setcap/getcap] Linux에서 1024 이하 포트 사용하기 (0) | 2023.10.27 |
---|---|
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! (0) | 2022.10.24 |
[Linux] Nginx 설치하기, 버전 확인하기 (0) | 2021.11.05 |
[Linux] pm2 설치하기 (0) | 2021.11.05 |
[Linux] nvm을 이용하여 node 설치 확인하기 (0) | 2021.11.05 |