How can I scroll up more (increase the scroll buffer) in iTerm2?

185.3k Views Asked by At

How can I scroll up more on iterm2 to get full output? At times, for example if I am doing unit tests, the errors are so large than I need to keep scrolling up to which I cannot scroll up anymore but the output continues further up beyond the top of the scroll. How can I access that? I tried page up more but not getting me there.

4

There are 4 best solutions below

6
On BEST ANSWER

There is an option “unlimited scrollback buffer” which you can find under Preferences > Profiles > Terminal or you can just pump up number of lines that you want to have in history in the same place.

0
On

An alternative would be to use less.

$ command | less
a lot of output from the command
gets cut off and you're able to
read the top of the output first
and are able to navigate the output
...

If you're EDITOR is set to vi or vim, you can navigate using the standard navigation (J, K). Press Q to stop reading the output.

Also, if you do decide to use the Ulimited scrollback setting, you can clear the Buffer using Cmd+K.

1
On

macOS default terminal (not iTerm2)

macOS 10.15.7

  1. open Terminal
  2. click Prefrences...
  3. select Window tab
  4. just change Scrollback to Limit number of rows to: what your wanted.

my screenshots

enter image description here

enter image description here

enter image description here

0
On

Solution: In order to increase your buffer history on iterm bash terminal you've got two options:

Go to iterm -> Preferences -> Profiles -> Terminal Tab -> Scrollback Buffer (section)

Option 1. select the checkbox Unlimited scrollback

Option 2. type the selected Scrollback lines numbers you'd like your terminal buffer to cache (See image below)

enter image description here