외부 서버에 ssh로 접속해서 장시간 모델 학습을 돌릴 때(또는 개발이라면 서버를 운용할 때?),
내가 터미널을 끄더라도 혹은 서버와 연결이 끊기더라도,
tmux 터미널 상에서 실행되고 있는 커맨드는 중단되지 않는다.
# 설치
apt update
apt install tmux
# tmux 터미널 생성
tmux new -s fcn_train
python baseline_FCN.py
# 터미널에서 나올 때:
[ctrl + B 눌렀다가 손 떼고 D 누르기]
# 나중에 다시 해당 터미널에 접속할 때
tmux attach -t fcn_train
# tmux 터미널 목록 출력
tmux ls
# 특정 tmux 터미널 삭제
tmux kill-session -t fcn_train
fcn_train -> 내가 생성하고자 하는 tmux 터미널 이름
python baseline_FCN.py -> 내가 실행하고자 하는 커맨드
References.
https://velog.io/@anjinwoong/Linux-Tmux-%EC%82%AC%EC%9A%A9%EB%B2%95
'Tools & Utilities > Linux & Server' 카테고리의 다른 글
| [Shell Script 실습] Ch5. 글로빙 및 shopt와 중괄호 확장(Globbing, shopt and Curly bracket(brace) Expansion) (0) | 2025.04.16 |
|---|---|
| [Shell Script 실습] Ch4. \$ 확장과 특별한 값들(\$ expansion and special values) (0) | 2025.04.16 |
| [Linux] Windows 11에서 WSL2 설치하고 VSCode 연동하기 (0) | 2025.04.14 |
| [Shell Script 실습] Ch3. 실행과 그룹핑(Execution and Grouping) (0) | 2025.04.10 |
| [Shell Script 실습] Ch2. 따옴표와 변수 설정(Quote and Variable) (0) | 2025.04.10 |