How do I increase my iterm (tmux) window scrollback (not the line scrollback)

18,863

Solution 1

Putting this in my .tmux.conf file was the trick:

set -g history-limit 20000

Solution 2

For tmux you can alter its scrollback buffer with

set-option history-limit 10000

The default is 2000.

You can put this directive in your ~/.tmux.conf or at the tmux command prompt (prefix + :).

It looks like iTerm is integrated with tmux. See: https://gitlab.com/gnachman/iterm2/wikis/TmuxIntegration

Share:
18,863
Michael Durrant
Author by

Michael Durrant

rails ruby rspec rock

Updated on September 18, 2022

Comments

  • Michael Durrant
    Michael Durrant almost 2 years

    When I want to scroll back, i.e. with my mouse (or with PageUp) I can only go up about 43 pages (about 2000 lines). Can I increase that?

    I have my terminal preference -> "Scrollback Lines" set to 1000000
    I also have my bashrc set with

    HISTSIZE=100000
    HISTFILESIZE=200000
    

    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 older content is lost.

    • cpugeniusmv
      cpugeniusmv about 10 years
      Is that tmux? It has its own scrollback independent of your terminal emulator.
  • Michael Durrant
    Michael Durrant about 10 years
    +1 for a useful lead (looking in the .tmux.conf) though this didn't work as is for me. My actual answer ended up below
  • cpugeniusmv
    cpugeniusmv about 10 years
    Ah ha! Yep, set is an alias for set-option. Here's a related question that I just found: stackoverflow.com/questions/18760281/…
  • Michael Durrant
    Michael Durrant about 10 years
    yeah. set-option actually didn't work for me
  • cpugeniusmv
    cpugeniusmv about 10 years
    Well, the critical bit you added was -g. I personally am not sure why that is important, but the linked question might have more information.