Krish

Search portfolio

Search pages, projects, blog posts, experience, and links.

Back to Blog
MDX

You must learn tmux right now!

tmux
terminal
ssh
productivity

I spin up GPU machines all the time for inference and fine-tuning. The launch flow is easy. The messy part starts after SSH:

  • I need multiple terminals for logs, training, and quick checks
  • I do not want jobs to die when the connection drops
  • I do not want five separate SSH windows open

tmux solves all of that.

Why tmux is worth it

tmux is a terminal multiplexer, which means:

  1. You can run multiple terminal sessions in one SSH connection.
  2. You can split your workspace into panes and windows.
  3. You can detach and reattach without losing long-running processes.
  4. You can keep everything organized for server-side work.
  5. You can customize the workflow via .tmux.conf.

A minimal daily workflow

1) Start a named session

tmux new -s dev
  • Creates a session named dev
  • Attaches immediately

2) Split into panes

Vertical split (left/right):

Ctrl-b %

Horizontal split (top/bottom):

Ctrl-b "

Move between panes:

Ctrl-b ← / → / ↑ / ↓

3) Detach and keep everything running

Ctrl-b d

Your commands continue in the background.

4) Reattach later

tmux attach -t dev

List sessions:

tmux ls

5) Stop a session

From outside tmux:

tmux kill-session -t dev

From inside tmux:

Ctrl-b :
kill-session

If you work on remote machines, tmux stops being "nice to have" very quickly. It becomes core infrastructure for your workflow.

You must learn tmux right now! - Krish Bakshi