tmux changed how I work. I used to have six terminal windows open, constantly alt-tabbing between them like an idiot. Then a colleague showed me tmux and I never went back.

Here is my setup, powered by Oh My Tmux.

Why tmux and Not screen

screen works. I used screen for years. But tmux does everything screen does and more ( better window management, sensible defaults, actual config file syntax, and it looks better ).

The main thing: tmux lets you detach and reattach sessions. Your long-running process stays alive even if your SSH connection drops. That alone is worth the switch.

tmux terminal window
tmux terminal window

Installation

One line:

sudo apt install tmux

Or on a Mac:

brew install tmux

That is it.

The Keybindings You Need

tmux uses a prefix key. Default is Ctrl+b. Oh My Tmux remaps it to Ctrl+a, which is where it should be. Ctrl+b is too far from home row.

Here is the set I use daily:

• `prefix + c` — new window

• `prefix + n` — next window

• `prefix + p` — previous window

• `prefix + d` — detach session

• `prefix + %` — vertical split

• `prefix + "` — horizontal split

• `prefix + x` — kill pane

Oh My Tmux adds more on top of these ( window renumbering, session switching, and a status bar that actually tells you something ). But these are the ones you need from day one.

tmux split panes
tmux split panes

Oh My Tmux: The Config That Saves Time

I do not maintain a hand-rolled .tmux.conf. I use Oh My Tmux ( https://github.com/gpakosz/.tmux ) and I have never looked back.

Install it:

cd ~

git clone https://github.com/gpakosz/.tmux.git

ln -s -f .tmux/.tmux.conf

cp .tmux/.tmux.conf.local .

The trick is: .tmux.conf is managed by the repo. You never edit it. All your personal tweaks go in .tmux.conf.local, which overrides the defaults. Updates are a git pull away and they never stomp your settings.

The local config file is well-documented. Every option has a comment. You toggle what you want and uncomment the rest.

For the core stuff, my .tmux.conf.local looks like this:

tmux_conf_theme_right_separator_main=""
tmux_conf_theme_left_separator_sub="|"
tmux_conf_theme_right_separator_sub="|"

tmux_conf_battery_bar_shrink=1
tmux_conf_theme_status_bg="#1a1b26"
tmux_conf_theme_status_fg="#a9b1d6"

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

That is it. Powerline separators, Tokyo Night colors, resurrect, and continuum. The rest Oh My Tmux handles.

Why this over a custom config? Because the default Oh My Tmux config does 90% of what you need ( sensible bindings, visual theme, battery indicator, uptime, session list in the status bar ). You only override the 10% that matters to you. And when the upstream repo fixes things or adds features, you get them for free.

Oh My Tmux config file
Oh My Tmux config file

Sessions Are the Real Power

This is where tmux beats every other terminal tool. Named sessions that persist:

tmux new -s project1

tmux ls

tmux attach -t project1

I have one session per project. Each session has its own windows and panes. When I switch projects I switch sessions. When I go home I detach. Tomorrow I attach and everything is exactly where I left it.

tmux-resurrect and tmux-continuum

Oh My Tmux supports both out of the box via TPM. You just enable them in .tmux.conf.local:

set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'

prefix + Ctrl-s — save session prefix + Ctrl-r — restore session

And tmux-continuum auto-saves every 15 minutes and restores on server start. I reboot my machine and my entire workspace comes back. Panes, windows, running processes, all of it. Zero manual restore needed.

tmux resurrect restore
tmux resurrect restore

Vim Integration

If you use Vim inside tmux, add this to your .tmux.conf.local:

Now Ctrl+h/j/k/l moves between Vim splits AND tmux panes seamlessly. One keybinding. Two worlds. Oh My Tmux already has this documented.

My Daily Workflow

I open one terminal. I type tmux attach. My workspace is there. Four windows, each with a purpose: editor, tests, git, and a scratch pad. The status bar ( courtesy of Oh My Tmux ) tells me the session name, the window index, the time, and battery. I go home, I detach. Next morning I attach and continue where I left off.

No more six terminal windows. No more losing work to dropped SSH connections. No more context rebuild after a restart. No more maintaining a 200-line .tmux.conf.

Oh My Tmux plus two plugins. That is the setup.