Skip to content

Instantly share code, notes, and snippets.

@azubkokshe
Last active May 11, 2025 11:49
Show Gist options
  • Save azubkokshe/e26cb34e3e836356106a470ce9fcf674 to your computer and use it in GitHub Desktop.
Save azubkokshe/e26cb34e3e836356106a470ce9fcf674 to your computer and use it in GitHub Desktop.
Write all tmux scrollback to a file
  1. Use prefix + :, then type in capture-pane -S -3000 + Return. (Replace -3000 with however many lines you'd like to save, or with - for all lines.) This copies those lines into a buffer.
  2. Then, to save the buffer to a file, just use prefix + : again, and type in save-buffer /home/{user}/filename.txt + return.

(By default Prefix is Ctrl+B.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment