Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
Last active November 15, 2026 02:50
Show Gist options
  • Select an option

  • Save MohamedAlaa/2961058 to your computer and use it in GitHub Desktop.

Select an option

Save MohamedAlaa/2961058 to your computer and use it in GitHub Desktop.
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

attach:

tmux a  #  (or at, or attach)

attach to named:

tmux a -t myname

list sessions:

tmux ls

kill session:

tmux kill-session -t myname

Kill all the tmux sessions:

tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill

In tmux, hit the prefix ctrl+b (my modified prefix is ctrl+a) and then:

List all shortcuts

to see all the shortcuts keys in tmux simply use the bind-key ? in my case that would be CTRL-B ?

Sessions

:new<CR>  new session
s  list sessions
$  name session

Windows (tabs)

c  create window
w  list windows
n  next window
p  previous window
f  find window
,  name window
&  kill window

Panes (splits)

%  vertical split
"  horizontal split

o  swap panes
q  show pane numbers
x  kill pane
+  break pane into window (e.g. to select text by mouse to copy)
-  restore pane from window
⍽  space - toggle between layouts
<prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane)
<prefix> { (Move the current pane left)
<prefix> } (Move the current pane right)
<prefix> z toggle pane zoom

Sync Panes

You can do this by switching to the appropriate window, typing your Tmux prefix (commonly Ctrl-B or Ctrl-A) and then a colon to bring up a Tmux command line, and typing:

:setw synchronize-panes

You can optionally add on or off to specify which state you want; otherwise the option is simply toggled. This option is specific to one window, so it won’t change the way your other sessions or windows operate. When you’re done, toggle it off again by repeating the command. tip source

Resizing Panes

You can also resize panes if you don’t like the layout defaults. I personally rarely need to do this, though it’s handy to know how. Here is the basic syntax to resize panes:

PREFIX : resize-pane -D (Resizes the current pane down)
PREFIX : resize-pane -U (Resizes the current pane upward)
PREFIX : resize-pane -L (Resizes the current pane left)
PREFIX : resize-pane -R (Resizes the current pane right)
PREFIX : resize-pane -D 20 (Resizes the current pane down by 20 cells)
PREFIX : resize-pane -U 20 (Resizes the current pane upward by 20 cells)
PREFIX : resize-pane -L 20 (Resizes the current pane left by 20 cells)
PREFIX : resize-pane -R 20 (Resizes the current pane right by 20 cells)
PREFIX : resize-pane -t 2 -L 20 (Resizes the pane with the id of 2 left by 20 cells)

Copy mode:

Pressing PREFIX [ places us in Copy mode. We can then use our movement keys to move our cursor around the screen. By default, the arrow keys work. we set our configuration file to use Vim keys for moving between windows and resizing panes so we wouldn’t have to take our hands off the home row. tmux has a vi mode for working with the buffer as well. To enable it, add this line to .tmux.conf:

setw -g mode-keys vi

With this option set, we can use h, j, k, and l to move around our buffer.

To get out of Copy mode, we just press the ENTER key. Moving around one character at a time isn’t very efficient. Since we enabled vi mode, we can also use some other visible shortcuts to move around the buffer.

For example, we can use "w" to jump to the next word and "b" to jump back one word. And we can use "f", followed by any character, to jump to that character on the same line, and "F" to jump backwards on the line.

   Function                vi             emacs
   Back to indentation     ^              M-m
   Clear selection         Escape         C-g
   Copy selection          Enter          M-w
   Cursor down             j              Down
   Cursor left             h              Left
   Cursor right            l              Right
   Cursor to bottom line   L
   Cursor to middle line   M              M-r
   Cursor to top line      H              M-R
   Cursor up               k              Up
   Delete entire line      d              C-u
   Delete to end of line   D              C-k
   End of line             $              C-e
   Goto line               :              g
   Half page down          C-d            M-Down
   Half page up            C-u            M-Up
   Next page               C-f            Page down
   Next word               w              M-f
   Paste buffer            p              C-y
   Previous page           C-b            Page up
   Previous word           b              M-b
   Quit mode               q              Escape
   Scroll down             C-Down or J    C-Down
   Scroll up               C-Up or K      C-Up
   Search again            n              n
   Search backward         ?              C-r
   Search forward          /              C-s
   Start of line           0              C-a
   Start selection         Space          C-Space
   Transpose chars                        C-t

Misc

d  detach
t  big clock
?  list shortcuts
:  prompt

Configurations Options:

# Mouse support - set to on if you want to use the mouse
* setw -g mode-mouse off
* set -g mouse-select-pane off
* set -g mouse-resize-pane off
* set -g mouse-select-window off

# Set the default terminal mode to 256color mode
set -g default-terminal "screen-256color"

# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on

# Center the window list
set -g status-justify centre

# Maximize and restore a pane
unbind Up bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp

Resources:

Notes:

Changelog:

Request an Update:

We Noticed that our Cheatsheet is growing and people are coloberating to add new tips and tricks, so please tweet to me what would you like to add and let's make it better!

@Microhx

Microhx commented Sep 8, 2026

Copy link
Copy Markdown

This tmux cheat sheet is super handy! I always forget the kill command. By the way, if you ever need to make a meme from a terminal screenshot, try the Bad Quality Image Maker for that perfect crunchy look.

@talha168518

Copy link
Copy Markdown

Great resource! Managing code snippets and dev tools efficiently saves so much time during technical projects. For anyone looking to test or check winter closure odds and algorithms, feel free to check out https://www.predictsnowday.com/ as well. Thanks for sharing this Gist!

@geometrydas12

Copy link
Copy Markdown

Thank you for compiling such a comprehensive tmux shortcuts cheatsheet! It's incredibly useful for streamlining workflows, especially when juggling multiple terminal sessions. The clarity of your layout makes it easy to absorb the material. This efficiency is reminiscent of how "space waves" in technology can enhance communication—bridging gaps effortlessly. Keep up the fantastic work!

@youyouguoke

Copy link
Copy Markdown

Useful breakdown of tmux shortcuts & cheatsheet. tmux shortcuts & cheatsheet. GitHub Gist: . The advice is easy to apply, and a related resource like https://freak-circus.com fits the same topic well.

@Enivel

Enivel commented Sep 17, 2026 via email •

Copy link
Copy Markdown

@lumian2015

Copy link
Copy Markdown

Thanks for sharing this tmux reference. On a separate note, I run SubmitSense, a website for students and researchers checking their writing before submission. If anyone here works on academic writing tools, I'd appreciate your feedback.

@cherryyan1987

Copy link
Copy Markdown

This cheat sheet is super helpful for anyone getting into tmux. I've been meaning to organize my shortcuts, and this is a great starting point. It reminds me of how focused I get when I'm playing a game like Pokennection, where you really need to concentrate on the connections. Pokennection

@cherryyan1987

Copy link
Copy Markdown

This is a great tmux cheatsheet! So many useful shortcuts here. It reminds me of how sometimes you just need the right tool to make things smoother, like how Size It Up helps you visualize and compare sizes in a fun way.

@hugh2nd

hugh2nd commented Sep 23, 2026

Copy link
Copy Markdown

The tmux cheatsheet speaks to a deep need for efficiency. It begs the question: what else can be streamlined? For SEO adventurers, the complex dance of backlinks and comment generation is made surprisingly simple with a tool for efficient link management.

@youyouguoke

Copy link
Copy Markdown

Useful breakdown of tmux shortcuts & cheatsheet. tmux shortcuts & cheatsheet. GitHub Gist: . The advice is easy to apply, and a related resource like https://gamemeta.org fits the same topic well.

@cherryyan1987

Copy link
Copy Markdown

This is a great cheatsheet for tmux! I've been meaning to get better with terminal multiplexers, and this breaks down the essential shortcuts really clearly. Definitely bookmarking this. It reminds me of how much I enjoy creative tools, like when I'm looking for something fun and relaxing to do online, I often check out Play Dressmaker Online. Play Dressmaker Online

@blogging112244-cell

Copy link
Copy Markdown

This is a really useful reference, especially for anyone who spends time managing servers from the terminal. The shortcuts for splitting and switching panes are probably some of the most useful parts of tmux once you get used to them.

For something completely different, I’ve also been working on a small resource about LMC 8.4, including its versions, XML configs, and setup details for Android cameras. It may be useful to anyone experimenting with GCam ports: https://lmc84apk.pro/

@blogging112244-cell

Copy link
Copy Markdown

This is a great reference. I’ve been spending some time with PvZ Fusion lately, and one thing I noticed is how much the game has changed between versions. New hybrids, balance changes, and different updates make it surprisingly hard to keep track of everything from scattered posts.

I’ve started keeping the version history and hybrid plant information together here: https://plantsvszombie.com/. I’ve found that much easier to use when checking what changed between releases.

@okiaimx-app

Copy link
Copy Markdown

I've watched half of you peek at this cheatsheet mid-command. Your ctrl+b reflexes are elite — point them at okiaimx, the browser aim trainer, and build a warm-up that matches your prefix speed.

@cherryyan1987

Copy link
Copy Markdown

This is a great cheatsheet for tmux, really helpful for remembering those commands quickly. It makes me think about how much time can be saved with these shortcuts. If you're looking for tools to optimize your workflow, check out WoW Forever Talents.

@cherryyan1987

Copy link
Copy Markdown

Really handy breakdown for tmux sessions and panes, since having exact key bindings right at hand cuts down on context-switching during dev work. When stepping away from the terminal, I usually check this Threshing Day game guide to unwind: Threshing Day game

@cherryyan1987

Copy link
Copy Markdown

Practical cheat sheet for tmux workflows, though stepping away from the terminal occasionally helps maintain focus. If you need a quick browser-based distraction between deployments, you could try Play Martin: No Filter Fighters Online.

@youyouguoke

Copy link
Copy Markdown

After reading "tmux shortcuts & cheatsheet", I liked how practical the whole piece feels. tmux shortcuts & cheatsheet. GitHub Gist: . One related page I keep coming back to is https://hoopervault.com; it adds another useful angle.

@juyibai08-maker

Copy link
Copy Markdown

Factory-direct UAN solutions with 28%, 30% or 32% total nitrogen by weight. Production, transport and export services.
Urea Ammonium Nitrate
UAN fertilizer

@leeyexiang

Copy link
Copy Markdown

This tmux cheatsheet is a lifesaver for anyone juggling multiple sessions. I particularly appreciate the clear breakdown of window and pane management shortcuts; it solved my recurring issue with splitting panes efficiently. While I spend most of my time at my keyboard, sometimes I switch to crafting perler bead patterns in bead pattern gallery to unwind. It's funny how both coding layouts and bead designs require similar spatial organization skills. Does anyone else find that tmux keybindings become muscle memory after just a few weeks?

@cherryyan1987

Copy link
Copy Markdown

Great breakdown of tmux pane syncing and copy mode. Helps me stay focused, though I still step away occasionally to play through this Plants vs. Zombies fan game Plants vs. Zombies fan game when the code won’t compile.

@cherryyan1987

Copy link
Copy Markdown

The cheat sheet’s synchronize-panes tip is genuinely useful for keeping multiple terminals aligned during long work sessions. When you finally need a screen break, PokéSurvivor provides a straightforward co-op experience to wind down.

@zhaobingkun

Copy link
Copy Markdown

I built a simple tool to compare LLM API pricing without jumping between a dozen different pricing pages.
https://llmapiprices.com/
It lets you compare official API prices with OpenRouter side by side, including input/output token costs and context windows.
There’s also a cost calculator where you can plug in your expected token usage and request volume to estimate how much a model would actually cost you.
If you're building with GPT, Claude, Gemini, DeepSeek, or other LLMs, it might save you some time when choosing a model.
Free to use — feedback is welcome.

@wyong32

wyong32 commented Oct 29, 2026

Copy link
Copy Markdown

This tmux cheatsheet is super handy—especially the pane management shortcuts when juggling multiple terminal tasks. For anyone diving into immersive horror games, I found the level maps and entity guides on escape the backrooms really helped me navigate the trickier sections without getting lost.

@fridaynightfunkymods

Copy link
Copy Markdown

Welcome to Wheelie Games, the free online home of the wheelie. Whether you are a seasoned rider who can hold a balance point for miles or a complete beginner who has just discovered the thrill of the wheel, our free-to-play games are built for you. There is nothing to download and nothing to pay — pick a motorcycle, a bike or a quad, lean back, and find out who really is the ultimate Wheelie.

@wyong32

wyong32 commented Nov 3, 2026

Copy link
Copy Markdown

Love the tmux cheatsheet—especially the pane syncing tips for monitoring live data pipelines. When I need a creative break from terminal work, I often browse the freak circus Characters for inspiration. Their distinct personalities and backstories make for great worldbuilding fuel.

@nom74100

nom74100 commented Nov 6, 2026

Copy link
Copy Markdown

If you're interested in ancient astrological cultures, you should definitely check out this website planetary hours Calculator https://planetaryhours.org/

@nom74100

nom74100 commented Nov 6, 2026

Copy link
Copy Markdown

Unblocked Games guarantees that players may continue to enjoy their favorite games on banned networks without the need for downloads or special permissions, and many users select fiddlebops websites because they provide quick gaming.

@pwna11

pwna11 commented Nov 8, 2026

Copy link
Copy Markdown

Great cheat sheet! I use tmux every day and these shortcuts save me so much time. When I get stuck on a command, I turn to ChatGPT for quick answers. Upgrading to gpt pro was a game changer for me, highly recommend it.

@harlanc

harlanc commented Nov 13, 2026

Copy link
Copy Markdown

Nice concise tmux cheat sheet—ideal for quick reference. If you love transforming text, check out FontBeam. It turns ordinary letters into hundreds of Unicode styles, so you can paste stylish text anywhere plain‑text is accepted: bios, captions, usernames, chats and documents. No font install needed—just copy and paste, making your messaging stand out effortlessly. Explore FontBeam today for a quick boost to your online presence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment