Tmux Windows Replace Terminal Tabs (And Then Some)

If you're still using terminal tabs, tmux windows do the same job with extras you didn't know you needed.

The hierarchy: Session > Window > Pane. A session holds multiple windows, each window can be split into panes. The bottom status bar shows all windows at a glance:

[main] 0:bash* 1:vim- 2:server

* marks the active window, - marks the previous one. You always know where you are.

Key bindings to internalize:

Action Key
New window Ctrl+b c
Next window Ctrl+b n
Previous window Ctrl+b p
Jump by number Ctrl+b 0~9
List all windows Ctrl+b w
Rename window Ctrl+b ,

What tmux gives you over plain terminal tabs:

  • Survives disconnects — SSH drops? Reconnect with tmux attach, everything is still there. Terminal tabs are gone the moment the connection dies.
  • Panes — Split any window horizontally or vertically without opening another tab.
  • Scriptable — Create and arrange windows/panes from a script or config.

The one real risk: if the machine itself reboots, the session is gone. tmux-resurrect and tmux-continuum can save/restore layouts, but in practice most people use tmux to survive network hiccups, not server reboots. A reboot means re-opening a session, which takes seconds.

Comments

  1. Markdown is allowed. HTML tags allowed: <strong>, <em>, <blockquote>, <code>, <pre>, <a>.