내용으로 건너뛰기
Out of the Box
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
Fold/unfold all
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
tmux:script
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== tmux: script ====== ===== 작업마다 session 생성 ===== <code bash> tmux new-session -d -s {session0} tmux send-keys '{command1}' C-m tmux send-keys '{command2}' C-m tmux new-session -d -s {session1} tmux send-keys '{command1}' C-m tmux send-keys '{command2}' C-m tmux new-session -d -s {session2} tmux send-keys '{command1}' C-m tmux send-keys '{command2}' C-m tmux attach -t {session0} </code> ===== 작업마다 pane 생성(한 session 생성) ===== <code bash> tmux new-session -d # detatch 상태로 시작 tmux split-window -v # pane 수직 분할 tmux split-window -v # tmux split-window -v -p 50 # tmux split-window -h -p 50 tmux select-layout tiled # 타일형태로 분할 tmux select-pane -t 0 # 0번 pane 선택 tmux send-keys 'top' C-m tmux select-pane -t 1 # 1번 pane 선택 tmux send-keys 'ls' C-m tmux select-pane -t 2 # 2번 pane 선택 tmux send-keys 'conda activate base' C-m # 마지막에 focus 맞추고 잇을 pane 선택 tmux setw synchronize-panes # 키입력 동기화 tmux -2 attach-session # 마지막 sesion에 attach </code> ====== uv로 임시 환경 만들어 사용 ====== <code python> tmux new-session -d # detach 상태로 시작 tmux split-window -h tmux split-window -v # tmux split-window -v # tmux select-layout tiled # global 환경변수 설정 export UVRUN="uv run --python=3.10 \ --with=ipython \ --with=zmq \ --with=gym==0.25.1 \ --with=git+https://github.com/djcunningham0/multielo.git \ --with=matplotlib \ --with=visdom==0.1.8.9 \ --with=natsort \ --with=psutil \ --with=netifaces \ --with=tensorboard \ --with=torchinfo \ --with=faster_fifo \ --with=protobuf==3.20.3 \ --with=uvloop \ --with=mlflow \ --with=termcolor \ --with=torch-ema \ --with=einops \ --with=blosc2 \ --with=seaborn \ --with=scikit-image" tmux select-pane -t 0 # 1번 pane 선택 tmux send-keys "$UVRUN ipython" C-m # " "을 써야 UVRUN이 환경변수 값으로 대체됨 tmux select-pane -t 1 # 0번 pane 선택 tmux send-keys "$UVRUN ipython" C-m tmux select-pane -t 2 # 1번 pane 선택 tmux send-keys "$UVRUN ipython" C-m # 마지막에 focus 맞추고 있을 pane 선택 # tmux setw synchronize-panes # 키입력 동기화 tmux -2 attach-session # 마지막 session에 attach </code> {{tag>tmux }}
tmux/script.txt
· 마지막으로 수정됨:
2025/04/15 10:24
저자
rex8312
문서 도구
문서 보기
이전 판
역링크
Fold/unfold all
맨 위로