tmux: Cheat Sheet, Scripts and Terminal Setup
4 posts on tmux, newest first.
GeekCoding101 has four hands-on posts tagged tmux, covering:
- a cheat sheet for panes, windows and sessions
- a Bash script that rebuilds a six-window dev environment after a reboot
- a terminal setup built on iTerm and tmux
- a Kubernetes lab tutorial
Start with Tmux Notes if you want shortcuts. Start with Crafting A Bash Script with Tmux if you want to automate your sessions.
Where to start
| If you want to… | Read | Length |
|---|---|---|
| Look up shortcuts for panes, windows and sessions, plus config, plugins and iTerm2 integration | Tmux Notes | 4 min |
| Rebuild a multi-window dev session (Django, Celery, Flower, Vue, Heroku) with one script after a reboot | Crafting A Bash Script with Tmux | 4 min |
| Set up a productive terminal environment around iTerm and tmux | Terminal Mastery: Crafting a Productivity Environment with iTerm, tmux, and Beyond | 6 min |
| Build a multi-node Kubernetes lab on a Mac with Rocky Linux 9 VMs in VMware Fusion | Kubernetes Tutorial Part 1: Multi-Node Cluster on a Mac | 22 min |
tmux quick reference
These are tmux’s default bindings. The prefix is Ctrl-b: press it, release, then press the next key. Tmux Notes has the full list and its own .tmux.conf tweaks.
| Action | Command / keys |
|---|---|
| Start a named session | tmux new -s name |
| List sessions | tmux ls |
| Re-attach to a session | tmux attach -t name |
| Detach (session keeps running) | Ctrl-b d |
| New window | Ctrl-b c |
| Next / previous window | Ctrl-b n / Ctrl-b p |
| Split pane left/right | Ctrl-b % |
| Split pane top/bottom | Ctrl-b " |
| Move between panes | Ctrl-b + arrow key |
| Reload config (from tmux command prompt) | Ctrl-b : then source-file ~/.tmux.conf |
- 22 min read
Kubernetes Tutorial Part 1: Cluster on a Mac
Build a multi-node Kubernetes lab on a Mac: plan the cluster and networking, create a Rocky Linux 9 base VM in VMware Fusion and prepare the nodes.
- 7 min read
iTerm2, tmux, Oh My Zsh & Powerlevel10k Setup on Mac
Set up a Mac terminal step by step: iTerm2, Nerd Fonts, Oh My Zsh with Powerlevel10k, and tmux via gpakosz/.tmux, plus tmux auto-attach on launch.
- 6 min read
Bash Script to Rebuild a tmux Dev Environment After Reboot
tmux-resurrect restores windows, not running services. Here's the script I use to rebuild a six-window Django, Celery, Vue tmux session after reboot.
- 6 min read
Tmux Cheat Sheet: Shortcuts, Sessions and Config Tips
Tmux shortcuts for panes, windows and sessions, plus copy-mode search, plugins, iTerm2 setup and the .tmux.conf tweaks I rely on.
FAQ
What is tmux? tmux is a terminal multiplexer. It lets you run several terminal windows and split panes inside one session. You can also detach from a session and re-attach later while your programs keep running.
Where is the tmux cheat sheet?
Tmux Notes is the cheat sheet. It covers shortcuts for panes, windows and sessions, along with configuration, plugins, iTerm2 integration and a customised .tmux.conf.
Does tmux keep my sessions after a reboot? No. tmux sessions live in memory, so a reboot ends them. Crafting A Bash Script with Tmux shows one way around this: a script that recreates a six-window dev environment and restarts its services.
Can I use tmux with iTerm2? Yes. iTerm2 has built-in tmux integration. Tmux Notes and Terminal Mastery both cover using the two together.
Are these posts free? Yes. Every GeekCoding101 post is free to read, with no sign-up.