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 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.

Subscribe to Imfiny

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe