Before diving deeper into tmux, there are a few fundamental skills and tools you need to prepare first: CLI navigation, job control, and SSH, all the way to installing tmux 3.7b, a modern terminal, and a Nerd Font.

Welcome to the Learn Tmux series! This series will take you from zero to production-ready with tmux, across 28 episodes in total: starting from prerequisites & environment setup, history & client-server architecture, session/window/pane lifecycle, prefix key & keybindings, copy mode & clipboard, ~/.tmux.conf configuration, pane layouts, multi-session workflow, status bar & themes, format strings & variables, custom keybindings & command mode, options & environment, persistence & session restore, scripting & CLI automation, hooks, TPM plugin ecosystem, remote development & SSH, multi-server & shared sessions, security & hardening, nested tmux, popups & latest features, and finally a production-ready setup.
Before you press any key, first understand where tmux sits in the stack. tmux is not a terminal replacement — it runs on top of the terminal, usually inside a shell. You open a terminal, enter tmux, and everything you see on screen is the output of the processes living inside it. Every tmux pane maps to a PTY (pseudo-terminal), where a shell process runs. When you detach, tmux releases the client from the server, but the processes inside the panes keep running because they never receive SIGHUP. This is why tmux sessions survive a dropped SSH connection — and it is the main reason this series exists.
Episode 0 is your roadmap: the fundamental skills you must have, the software we set up (tmux 3.7b, a modern terminal, a Nerd Font, supporting tooling), and verification that everything works.
tmux is a container for processes, and most of the processes you run deal with files and services. Without the following skills, even the most sophisticated tooling setup will be useless.
You should be comfortable changing directories, listing contents, and creating, copying, moving, and deleting files:
ls -la
cd ~/proyek
mkdir -p ~/lab/tmux
cp config.tmux backup.config.tmuxAdd mv to move or rename files, and rm to delete — skills you will use every day, including when managing tmux configuration files in episode 8.
Before multiplexers became popular, developers relied on shell job control to run several things in one terminal — a clunky trick that was easy to get tangled up in. Understand the following inputs:
| Input | Function |
|---|---|
perintah & | Run a command in the background |
Ctrl+C | Send SIGINT, stop the foreground process |
Ctrl+Z | Send SIGTSTP, suspend the foreground process |
jobs | Show the list of shell jobs |
fg | Bring the last job back to the foreground |
bg | Resume a suspended job in the background |
Job control matters for two reasons: first, understanding how processes live and die in a terminal makes it easier to grasp tmux's detach concept; second, job control is still useful inside a pane.
Most real-world tmux usage happens over SSH, managing production servers. Remember this rule: SSH is a remote terminal session. When the connection drops, the remote terminal closes and every process inside it receives SIGHUP — unless that process is protected by tmux.
ssh devnull@203.0.113.42
ssh -i ~/.ssh/deploy-key devnull@203.0.113.42For long sessions on unstable networks, the following ~/.ssh/config configuration makes the connection much more resilient:
Host server-prod
HostName 203.0.113.42
User devnull
ControlMaster auto
ControlPath ~/.ssh/cm-%r@%h:%p
ServerAliveInterval 30
ServerAliveCountMax 3ControlMaster auto enables connection multiplexing (a second connection does not need to re-handshake), ServerAliveInterval 30 sends a keepalive packet every 30 seconds, and ServerAliveCountMax 3 closes the connection after three failed keepalives. You do not need to memorize these flags — what matters is understanding the concept: a stable connection is the best prerequisite for working with tmux remotely.
tmux inherits its environment from the shell that launches it. You should understand $PATH, $HOME, and where your shell configuration lives (~/.bashrc or ~/.zshrc), because in episode 8 we will add a line to load the tmux configuration from an external file.
echo $PATH
echo $HOMEWarning
If tmux returns an error command not found, the binary is most likely missing from $PATH. This is one of the most common mistakes in this episode — and it is usually fixed simply by adding the install directory to your shell config and opening a new terminal.
| No | Tool | Type | Level | Keterangan |
|---|---|---|---|---|
| 1. | Laptop / PC | Hardware | Wajib | Mesin utama; spesifikasi standar sudah cukup |
| 2. | tmux 3.7b | Software | Wajib | Terminal multiplexer utama; rilis stabil terbaru |
| 3. | Terminal modern | Software | Wajib | Dengan dukungan true color (Kitty, WezTerm, Ghostty, Alacritty, iTerm2) |
| 4. | Nerd Font | Font | Wajib | Menampilkan icon status bar dengan benar (FiraCode/JetBrainsMono) |
| 5. | Git | Software | Wajib | Version control & basis plugin manager (TPM) |
| 6. | fzf | Software | Direkomendasikan | Fuzzy finder untuk preview windows & navigasi cepat |
| 7. | Build tools (make, gcc) | Software | Kondisional | Hanya dibutuhkan jika build tmux dari source |
The version we use throughout this series is tmux 3.7b — the latest stable release. Some of the features we cover (popups, floating panes, line selection in copy mode) are only available in version 3.5 and above, so make sure your version is correct.
sudo apt update && sudo apt install -y tmuxWarning
Stable distro repositories (especially Debian's) often ship a much older tmux, for example 3.2 or 3.3. Features such as popups (3.5), pane scrollbars (3.6), and floating panes (3.7) will not be available. If tmux -V reports an old version, use the build-from-source method below.
brew update
brew install tmuxIf the distro package is too old, build from source using a specific version tag:
sudo apt install -y libevent-dev libncurses-dev build-essential
git clone --depth 1 --branch 3.7b https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make
sudo make installOnce installed, verify the version — the output should show tmux 3.7b (or at least 3.7.x):
tmux -Vtmux renders a screen cell grid on top of your terminal, so the display quality depends on the terminal you use. A modern terminal with true color (24-bit) will render the status bar theme smoothly; an older terminal that only supports 256 colors makes colors look washed out.
| Terminal | Platform | Keunggulan |
|---|---|---|
| Kitty | macOS & Linux | GPU-accelerated, fitur lengkap |
| WezTerm | Semua platform | Konfigurasi Lua, multiplexer bawaan |
| Ghostty | macOS & Linux | Cepat, minimal, GPU-accelerated |
| Alacritty | Semua platform | GPU-accelerated, sangat ringan |
| iTerm2 | macOS | Default terbaik di macOS |
| Windows Terminal | Windows | Default terbaik di Windows |
Tip
The golden rule: support true color and use a dark background. The tmux status bar colors (and the theme we will build in episode 10) depend on this. Outdated built-in terminals such as cmd.exe are best left behind.
A Nerd Font is a font patched with thousands of glyphs/icons that a modern status bar needs — for example triangles, folders, and git symbols. Without a Nerd Font, those icons show up as empty boxes (tofu).
Recommendations: FiraCode Nerd Font or JetBrainsMono Nerd Font.
mkdir -p ~/.local/share/fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/JetBrainsMono.zip
unzip JetBrainsMono.zip -d ~/.local/share/fonts
fc-cache -fv ~/.local/share/fontsWarning
The font must be set in the terminal, not in tmux. Many beginners install a Nerd Font and then wonder why the icons are still boxes — that is because their terminal is still using the old font. Change the font in your terminal's settings, then close and reopen the terminal for the change to take effect.
| Tool | Fungsi | Kenapa Dibutuhkan |
|---|---|---|
git | Version control | Plugin manager (TPM) meng-clone plugin dari GitHub |
fzf | Fuzzy finder | Preview windows & navigasi cepat dalam workflow tmux |
make / gcc | Build tools | Diperlukan saat membangun tmux dari source |
sudo apt install -y git fzf build-essentialOnce everything is ready, it is time for your first test:
tmux
tmux new -s labYou will enter a tmux session with one window containing a single pane — the usual shell prompt, but now with a status bar at the bottom. To prove tmux is alive:
Ctrl+B then ? — the keybinding list appears. Press q to close it.Ctrl+B then d — you detach back to the normal shell prompt. The processes inside tmux keep running.tmux attach -t lab.Important
Detaching is not exiting. When you press Ctrl+B and then d, you are not closing the session — you are only releasing the client. The session and all the processes inside it keep running, just like a sleep 300 & process running in the background. This is the fundamental difference from pressing exit or Ctrl+D.
command not found: tmux. The binary is missing from $PATH. Solution: check the install location, add it to your shell config (~/.bashrc/~/.zshrc), then open a new terminal.ServerAliveInterval and ServerAliveCountMax in ~/.ssh/config, and protect your work with tmux so nothing is lost when the connection drops.exit in the last pane. Closing all panes/windows closes the session and kills the processes. If you want to come back later, use detach (Ctrl+B then d) — not exit.In this episode 0 we built a solid foundation: we mastered the fundamental skills (CLI navigation, job control, SSH, and environment variables), installed tmux 3.7b, set up a modern terminal with true color, installed a Nerd Font, and added the supporting tooling (git, fzf). We also verified that the first session runs and that the Ctrl+B prefix responds.
Key takeaways to carry with you:
Make sure all of the tools above are ready, because the next episode covers concepts. In episode 1 next, we will discuss the history, background, and why the world needed tmux — from the problems before modern multiplexers, GNU Screen (1987), the birth of tmux by Nicholas Marriott (2007), to the version 3.x roadmap that brought modern features. Stay excited — the tmux learning journey is just beginning!