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


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.

  • 3
    Is that tmux? It has its own scrollback independent of your terminal emulator. Commented Apr 7, 2014 at 17:48

2 Answers 2


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

set -g history-limit 20000
  • Ah ha! Yep, set is an alias for set-option. Here's a related question that I just found: stackoverflow.com/questions/18760281/… Commented Apr 7, 2014 at 22:37
  • 1
    yeah. set-option actually didn't work for me Commented Apr 8, 2014 at 0:51
  • 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. Commented Apr 8, 2014 at 3:38
  • -g means global. That is all values of that setting in all sessions/windows/panes etc. Not just the one where the setting was applied, via, e.g. the keyboard. The regardless. The antithesis of -s (session) -p (pane) and -w (window). This also becomes the new default for a setting if no other per item setting is given.
    – Jay M
    Commented Sep 20, 2023 at 15:02

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

  • 1
    +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 Commented Apr 7, 2014 at 22:19
  • What was the answer? I don't see any below this one.
    – majorgear
    Commented Dec 9, 2023 at 0:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .