How to increase scrollback buffer size in tmux?

tmux unlimited scrollback
tmux scroll up mac
tmux scroll with mouse
tmux conf
set scroll tmux
tmux scroll vim mode
tmux reload config
tmux history-limit not working

How do I increase scrollback buffer size in tmux?

If I enter copy mode, the number of available scrollback lines (visible in upper right corner) is always below 2000. I tried to find a list of all tmux commands, but I can't find anything about scrollback size. For all I see the screen command for setting that option doesn't work with tmux.

Using tmux 1.8, Ubuntu 12.04 LTS, either konsole or gnome-terminal.


The history limit is a pane attribute that is fixed at the time of pane creation and cannot be changed for existing panes. The value is taken from the history-limit session option (the default value is 2000).

To create a pane with a different value you will need to set the appropriate history-limit option before creating the pane.

To establish a different default, you can put a line like the following in your .tmux.conf file:

set-option -g history-limit 3000

Note: Be careful setting a very large default value, it can easily consume lots of RAM if you create many panes.

For a new pane (or the initial pane in a new window) in an existing session, you can set that session’s history-limit. You might use a command like this (from a shell):

tmux set-option history-limit 5000 \; new-window

For (the initial pane of the initial window in) a new session you will need to set the "global" history-limit before creating the session:

tmux set-option -g history-limit 5000 \; new-session

Note: If you do not re-set the history-limit value, then the new value will be also used for other panes/windows/sessions created in the future; there is currently no direct way to create a single new pane/window/session with its own specific limit without (at least temporarily) changing history-limit (though show-option (especially in 1.7 and later) can help with retrieving the current value so that you restore it later).

How do I increase my iterm (tmux) window scrollback (not the line , but these settings aren't helping. You see how far in the terminal top right, i.e.. enter image description here. and 1900-2000 seems about the max at which point  How to increase scrollback buffer size in tmux? (2) Open tmux configuration file with the following command: vim ~/.tmux.conf In the configuration file add the following line: set -g history-limit 5000 Log out and log in again, start a new tmux windows and your limit is 5000 now.


Open tmux configuration file with the following command:

vim ~/.tmux.conf

In the configuration file add the following line:

set -g history-limit 5000

Log out and log in again, start a new tmux windows and your limit is 5000 now.

Tmux Increase Scrollback Buffer Size, The difference between terminal and tmux scrollback buffers, and Alternate buffer has exact width and height dimensions as physical window size. Another tmux's default I would prefer to change is the mouse wheel scroll. How do I increase scrollback buffer size in tmux? If I enter copy mode, the number of available scrollback lines (visible in upper right corner) is always below 2000. I tried to find a list of all tmux commands, but I can't find anything about scrollback size. For all I see the screen command for setting that option doesn't work with tmux.


This builds on ntc2 and Chris Johnsen's answer. I am using this whenever I want to create a new session with a custom history-limit. I wanted a way to create sessions with limited scrollback without permanently changing my history-limit for future sessions.

tmux set-option -g history-limit 100 \; new-session -s mysessionname \; set-option -g history-limit 2000

This works whether or not there are existing sessions. After setting history-limit for the new session it resets it back to the default which for me is 2000.

I created an executable bash script that makes this a little more useful. The 1st parameter passed to the script sets the history-limit for the new session and the 2nd parameter sets its session name:

#!/bin/bash
tmux set-option -g history-limit "${1}" \; new-session -s "${2}" \; set-option -g history-limit 2000

tmux in practice: scrollback buffer, The history limit is a pane attribute that is fixed at the time of pane creation. The value is taken from the history-limit session option (the default  Be sure that you are increasing BOTH the putty scrollback buffer as well as the screen scrollback buffer, else your putty window itself won't let you scroll back to see your screen's scrollback history (overcome by scrolling within screen with ctrl+a->ctrl+u) You can change your putty scrollback limit under the "Window" category in the settings.


How to increase scrollback buffer size in tmux?, tmux set-option history-limit 5000 \; new-window. For (the initial pane of the initial window in) a new session you will need to set the “global”  Since there's unlimited scrollback buffer, memory just keeps getting eaten especially if you're tailing logs or catting large logfiles. It would probably solve the issue if there was an option to limit scrollback (check out iTerm2's options around this)


tmux-config/tmux.conf at master · pivotal-legacy/tmux-config · GitHub, Configuration and tools for tmux. Can be used as a Change cursor in vim to distinguish between insert and command mode scrollback buffer size increase. This is 3rd part of my tmux in practice article series.. Usually terminal emulators implement scrollback buffer, so you can explore past output, when it moves out of view. tmux, like other full


How do I scroll in tmux?, In vi mode (see below), you can also scroll the page up/down line by line using Shift - k and Shift - j (if Change the prefix key so you won't have to reach one bit​. This will copy it to traditional terminal buffer instead of the tmux copy buffer. As @juanpaco correctly stated, clear-history is the command to clear the scrollback buffer. I'll add that I like to also clear what's on the screen in the same command. Issuing a send-keys -R resets (clears) the screen, so I use the following in my .tmux