DEV Community

Cover image for Give Your Terminal Super Powers: tmux Cheatsheet!

Give Your Terminal Super Powers: tmux Cheatsheet!

Jacob Herrington (he/him) on October 31, 2019

tmux is an application that I use in my terminal to manage several programs running at once. I've used it on Linux and Mac, it's one of the first t...
Collapse
 
schasse profile image
Sebastian Schasse

Great post!

I'm using the terminal a lot and am usually very lazy with using the mouse^ That's why I'm using easymotion a lot. Unfortunately, there was no easymotion plugin for tmux and I wrote one myself. Check it out github.com/schasse/tmux-easymotion

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

That's cool. 👀 I'll take a look!

Collapse
 
saturniusmons profile image
Shane • Edited

My 'favourite' command is ctrl+b z to zoom a pane in or out.

I have set-option -g mouse in my ~/.tmux.conf so I can click on a pane and it is magically in focus and for copy/pasting

My only pain point is I want to be able to do what I do in screen and that is detach a pane and let it run in the background whilst I do other things, so I can put my IRC panes away when I'm trying to work!

Collapse
 
rhymes profile image
rhymes

Great overview.

A note for macOS users: the modifier shortcut in tmux installed by brew install tmux is Ctrl-a, not Ctrl-b.

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Great catch, molte grazie Rhymes!

Collapse
 
puritanic profile image
Darkø Tasevski

I would also recommend this tmux configuration, both for beginners and experienced devs:

github.com/gpakosz/.tmux

I've started using it with the intention of tailoring it to my own needs but instead did just some minimal changes, as it's really great config.

Collapse
 
alocquet profile image
Arnaud

Thx for this post.
I have seen an error on Split pane horizontaly shortcut : CTRL+b % instead of CTRL+b "

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Thanks!!!

Collapse
 
cogoo profile image
C.OG

Tmux paired with Tmuxinator is a dream!

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

I've never used Tmuxinator. Sounds intense. I'll search for it later! 😋

Collapse
 
awwsmm profile image
Andrew (he/him)

tmux is one of those things that -- along with Git -- seemed completely incomprehensible the first time I encountered it. I'll have to give it another shot, using your guide.

Thanks, Jacob!

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

It's more intimidating than it should be. You can learn two or three hotkeys and benefit from it. Start slow and don't worry if it takes you a few weeks for the shortcuts to feel natural!

Collapse
 
ujwaldhakal profile image
ujwal dhakal

I have been using terminator for same

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

I haven't used terminator, but I know some people like it a lot. It's a good alternative, I think. 😁

Collapse
 
ujwaldhakal profile image
ujwal dhakal

yes it is

Collapse
 
sebbestune profile image
Sebastian Lindgren

Great overview!

Collapse
 
prashantsengar profile image
Prashant Sengar

Thanks Jacob. This was really a very nice guide for introduction to tmux. I will give it a try.

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Glad you enoyed it!

Collapse
 
lucianobarauna profile image
Luciano Baraúna

I've been using tmux for a while and only got compliments :-).
And after a while I started using byobu.org/ which is a handy hand facilitating tmux shortcuts