๐ tmux ์๋น์ค ๊ด๋ฆฌ ๋ฐ ์ด๋ ๋ช ๋ น์ด ์์ฝ
-
ํ์ฌ ์คํ ์ค์ธ ๋ชฉ๋ก ํ์ธbashtmux ls ์ฝ๋๋ฅผ ์ฌ์ฉํ ๋๋ ์ฃผ์๊ฐ ํ์ํฉ๋๋ค.ํ์ฌ ์๋ฒ์์ ์ผ์ ธ ์๋ ๋ชจ๋ ์ธ์ ๋ฒํธ(ID) ํ์ธ
sample
root@cp:/home/public_html# tmux ls 2: 1 windows (created Tue Jun 30 21:24:35 2026) 6: 1 windows (created Fri Jul 3 17:09:43 2026)
-
์ธ์ ๊ฐ ์ด๋ ๋ฐ ๋๊ฐ๊ธฐ (๋จ์ถํค) ์ธ์ ๋ชฉ๋ก ํ์ ์ฐฝ ๋์ ๋ฐ๋ก ์ด๋: Ctrl + b ๋๋ฅธ ํ ์ ๋ผ๊ณ s ํ์ฌ ํ๋ฉด ๋ฐ์ผ๋ก ์์ ํ๊ฒ ๋น ์ ธ๋๊ฐ๊ธฐ: Ctrl + b ๋๋ฅธ ํ ์ ๋ผ๊ณ d
-
์ ๋ฆฌ๋ ํ์ฌ ์ธ์ ์ ์ (์ซ์ ID ๊ธฐ์ค)
- ์ด๋ฏธ ์คํ ์ค์ธ ๋ฐฉ์ ์ ์ํ ๋ ์ฌ์ฉํฉ๋๋ค. (๋จ, tmux ๋ฐ์์ ์ ๋ ฅํด์ผ ํจ)
- Claude AI ํ๋ฉด ์ ์: tmux attach -t 2
- Codex ๊ฐ๋ฐ ํ๋ฉด ์ ์: tmux attach -t 6
- ํ๋ก๊ทธ๋จ์ด ๊บผ์ก์ ๋ ์๋ก ์ผ๋ ๋ช ๋ น์ด (์ด๋ฆ ์ง์ ๋ฐฉ์)
- ์๋ฒ ์ฌ๋ถํ ๋ฑ์ผ๋ก ํ๋ก๊ทธ๋จ์ด ์์ ๊บผ์ก์ ๋, ๋ฐฑ๊ทธ๋ผ์ด๋์ ์ ๋ฐฉ์ ๋ง๋ค๊ณ ์คํํ๋ ๋ช ๋ น์ด์ ๋๋ค.
- Claude AI ์๋ก ์ผ๊ธฐ: tmux new-session -d -s claude 'claude'
- Codex ์๋ก ์ผ๊ธฐ: tmux new-session -d -s codex 'node /usr/bin/codex'
- ์ด๋ฆ์ผ๋ก ์๋ก ์ผ ํ ์ ์ํ๋ ๋ฐฉ๋ฒ
- ์ 4๋ฒ ๋ช ๋ น์ด๋ก ๋ฐฉ์ ์๋ก ๋ง๋ ํ์๋ ์ซ์๊ฐ ์๋ ์ด๋ฆ์ผ๋ก ํธ๋ฆฌํ๊ฒ ์ ์ํฉ๋๋ค.
- Claude AI ํ๋ฉด ์ ์: tmux attach -t claude
- Codex ๊ฐ๋ฐ ํ๋ฉด ์ ์: tmux attach -t codex
- ์๋ฒ ๋ด๋ถ ์ค์๊ฐ ํ๋ก์ธ์ค ์ ๋ฐ ์กฐํ tmux ๋ด๋ถ์์ ์ค์ ์ด๋ค ํ๋ก๊ทธ๋จ์ด CPU๋ฅผ ์ฐ๋ฉฐ ๋๊ณ ์๋์ง ์์ฒ ํ์ธํ๋ ๋ช ๋ น์ด์ ๋๋ค. ps -ef | grep -E "pts/[0-9]+" | grep -v grep

๋๊ธ 0