Simple tmux tricks

Tmux has replaced a long time ago our use of screen to handle persistent sessions on remote servers and also more powerful terminals on our work stations.

Tmux is powerful, it has a few downsides (ssh agent, copy paste, ...) but overall it can really make a terminal a lot more productive.

Tmux basics

Creating a tmux session is easy : tmux, the basic shortcuts to know are "Ctrl b + c" to create a new window, "Ctrl b + n" to jump to the next window and "Ctrl b + d" to detach.
To reattach running tmux attach is the one to use.

Tmux splits

The next level after different windows is using splits : "Ctrl b + %" create a vertical split in the current frame, "Ctrl b + " " (yes that a double quote) will create an horizontal split.

To jump between splits you can use "Ctrl b + ". To maximize and minimize a split "Ctrl b + z" and to cycle through a couple of composition with multiple splits you can use "Ctrl b + ".

Tmux foo

Finally the last tip is about how to type at the same time in all the splits. While running tmux and with 2 or more splits open you can type "Ctrl b + :" (to go on the tmux command) and type : "setw synchronize-panes on" (and the same with off when you are done). And then everything you type in one frame will appear in the other ones. Very practical to synchronise your actions across several hosts.

Need help ?

We specialise in helping small and medium teams transform the way they build, manage and maintain their Internet based services.

With more than 10 years of experience in running Ruby based web and network applications, and 6 years running products servicing from 2000 to 100000 users daily we bring skills and insights to your teams.

Wether you have a small team looking for insights to quickly get into the right gear to support a massive usage growth, or a medium sized one trying to tackle growth pains between software engineers and infrastructure : we can help.

We are based in France, EU and especially happy to respond to customers from Denmark, Estonia, Finland, France, Italy, Netherlands, Norway, Spain, and Sweden.

We can provide training, general consulting on infrastructure and design, and software engineering remotely or in house depending on location and length of contract.

Contact us to talk about what we can do : sales@imfiny.com.