Copying and Pasting Text

Moving around and looking for things in our output buffer is usually only half the equation. We often need to copy some text so we can do something useful with it. tmux’s Copy mode gives us the opportunity to select and copy text to a paste buffer so we can dump that text elsewhere.

To copy text, we enter Copy mode and move the cursor to where we want to start selecting text. We then press Space and move the cursor to the end of the text. When we press Enter, the selected text gets copied into a paste buffer.

To paste the contents we just captured, press Prefix ].

Let’s look at a few specific ways to copy and paste text from our main output buffer.

Capturing a Pane

tmux has a handy shortcut that copies the entire ...

Get tmux now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.