· 1 min read
tmux Shortcut Key Notes
This article was auto-translated from Chinese. Some nuances may be lost in translation.
I’ve always had the habit of switching tabs directly through the tab feature of iTerm2. While this approach isn’t problematic, ever since I discovered the benefits of using tmux, I’ve shifted all my terminal operations to it. tmux introduces a few key concepts: session, window, and panel. Each window can contain multiple panels, and each panel can access different sessions, which is incredibly convenient when working with remote servers.
Its shortcut key philosophy is quite unique, using <C-b> as a prefix for other key combinations. In this article, I’ll document some of the shortcuts I commonly use:
| Function | |
|---|---|
tmux new -s name | Create a new session |
tmux a -t name | When the terminal closes, tmux retains the session; you can attach to restore the original session state |
tmux ls | List the current sessions |
| c | Create window |
| & | Kill window |
| . | Name window |
| % | Vertical split (within the same page) |
| “ | Horizontal split (within the same page) |
| x | Kill panel |
| , | Rename panel |
| z | Temporarily hide other panels |
Related Posts
- When Measurement Becomes the Goal: From Window Tax to PR Counts I once wrote a small tool to count how many PRs I had contributed in a quarter, how many reviews I had left, and how many tickets I had closed, hoping to use the numbers to prove my output to my manager. My manager simply said performance is not judged by output alone. Only years later did I understand—when measurement becomes the goal, it is no longer a good measure. From Britain’s window tax and the Hanoi rat bounty to evaluating developers by PR count today, the mechanism is exactly the same.
- Using Cloudflare Images for Image Storage and Transformation Putting an image on a web page is the easiest thing in frontend. But doing it properly — resizing, generating every format, holding up under traffic — turns into a whole solution of its own. I ended up handing all of it to Cloudflare Images and keeping just one original.
- Stop Using Access Keys Already Access Keys are an easily overlooked security risk on AWS. Use OIDC with IAM Roles so GitHub Actions can securely access AWS resources without any secrets.
- Database Primary Keys: AUTO_INCREMENT, UUID, and UUIDv7 Backend developers often have to decide on a primary key: auto increment or UUID? What about collisions? How much faster is UUIDv7 compared with created_at + index? After benchmarking 20 million rows and looking at the design trade-offs, this post gives you the answer.