Skip to content
On this page

    iTerm2 Scrollback Lines

    2 min read

    Every time I get a new MacBook and set up iTerm2, I end up searching for the same setting. Documenting this so I never have to again.

    The setting you want

    iTerm2 > Preferences (or Cmd + ,) > Profiles > select your profile > Terminal > Scrollback lines.

    This controls how many lines of past output iTerm2 keeps in the buffer above the visible screen. The default is 1000 lines. Bump it up, or check Unlimited scrollback if you never want to lose output.

    The change takes effect immediately. One gotcha: enable “Unlimited scrollback” before changing the line count, otherwise you can lose the current buffer mid-session.

    Scrollback vs. window width

    Two different problems, two different settings:

    What you wantSettingWhere
    More past output when scrolling upScrollback linesProfiles > Terminal
    More characters fitting per rowWindow columnsProfiles > Window

    If your long commands are wrapping, you want columns (or just make the window wider). If you can’t scroll back far enough to find that build error from 10 minutes ago, you want scrollback lines.

    What I Learned

    • Scrollback lines = how much history lives above the viewport
    • Columns/width = how much text fits on a single row
    • Check “Unlimited scrollback” first to avoid losing your current buffer
    • The setting lives under Terminal, not Window (which is where I always look first)