· 1 min read
tmux Shortcut Notes
This article was auto-translated from Chinese. Some nuances may be lost in translation.
I had always been used to switching tabs directly using iTerm2’s tab feature in the terminal. While there was nothing really wrong with that, ever since discovering how useful tmux is, I’ve moved all my terminal operations over to tmux. tmux revolves around a few core concepts: session, window, and panel. Each window can contain multiple panels, and each panel can access different sessions separately, which is very convenient when working on remote servers.
Its shortcut philosophy is quite unique—everything starts with <C-b> as the prefix key, combined with other keystrokes. This post serves as a quick record of some shortcuts I frequently use:
| Function | |
|---|---|
tmux new -s name | Create a new session |
tmux a -t name | tmux preserves sessions when the terminal closes; you can use attach to restore the session |
tmux ls | List current sessions |
| c | Create window |
| & | kill window |
| . | name window |
| % | Split vertically (within the same screen) |
| “ | Split horizontally (within the same screen) |
| x | kill panel |
| , | Rename panel |
| z | Temporarily hide other panels |
Related Posts
- When a Measure Becomes a Target: From the Window Tax to Pull Request Counts I once wrote a script to tally how many PRs I contributed in a quarter, how many reviews I left, and how many tickets I closed, hoping to use numbers to prove my output to my manager. My manager simply remarked that performance isn't just about output. Years later, I finally understood—when a measure becomes a target, it ceases to be a good measure. From the British window tax and the Hanoi rat bounty to evaluating developers by PR counts today, the underlying mechanism is exactly the same.
- Using Cloudflare Images for Image Storage and Transformation Putting an image on a webpage is the simplest task in frontend development. But doing it properly—including resizing, generating multiple formats, and withstanding heavy traffic—is actually an entire end-to-end solution. Eventually, I offloaded everything to Cloudflare Images, keeping only a single original image.
- Stop Using AWS Access Keys Access Keys are an easily overlooked security risk in AWS. By pairing OIDC with IAM Roles, GitHub Actions can securely operate AWS resources without storing any secrets.
- Database Primary Keys: AUTO_INCREMENT, UUID, and UUIDv7 Backend developers often face the choice of primary keys: should you use auto-increment or UUID? What about collisions? How does UUIDv7 compare to created_at + index in performance? Here are the design decisions and benchmark results from testing 20 million rows.