by Alexey Samoshkin

Explore tmux and its tough questions and tricks, including features, nested sessions, scrollback buffer, clipboard integration, and iTerm2 integration.

I just finished my writings on tmux topic.

There are several topics I’ve covered so far. This post’s goal is to be an index page to all parts of “tmux in practice” series. Happy reading:

Part 1. Tmux in practice: explores local and nested remote tmux sessions. It also discusses tmux features in general, their relevance for local and remote scenarios, and how to setup and configure tmux to support nested sessions.

Part 2. tmux in practice: iTerm2 and tmux integration includes benefits and drawbacks of using iterm2 vs tmux locally. It shows how to set up iTerm2 profile to override key mappings to trigger analogue tmux actions.

Part 3. tmux in practice: scrollback buffer. Explores the difference between terminal and tmux scrollback buffers. Shows how to tweak copy mode, scroll, and mouse selection tmux behavior.

Part 4. tmux in practice: integration with system clipboard. Builds a bridge between the tmux copy buffer and system clipboard, to store selected text on OSX or Linux system clipboard in a way that addresses both local and remote usage scenarios.

Part 5. tmux in practice: copy text from remote session using SSH remote tunnel and systemd service. Yet another way to copy text from remote session into local clipboard.

Everything discussed here you can see in action by checking my tmux Configuration project on Github: tmux-config