33

I have a running log, it outputs a lot to the terminal. Unfortunately, when I try to scroll up and view older output, it appears there is a limit. And I am unable to scroll past a certain point. On the Mac, the terminal allows you to scroll up to the start of the session. Is there a way to do this in ubuntu terminal?

1
  • 1
    konsole, the terminal program from KDE, has a setting to control the number of "scrollback" lines it remembers, including Unlimited setting. I suppose Gnome terminal should have something similar but I can't check at the moment.
    – Sergey
    Dec 11, 2012 at 0:57

5 Answers 5

35

Go to Edit -> Profile Preference -> Scrolling Tab

Now just tick the Unlimited box below Scrollback.

You will now be able to see your entire output.

enter image description here

6
  • @JohnMerlino If the answer was useful to you, Consider upvoting the answer
    – Hashken
    Dec 11, 2012 at 2:16
  • where find Edit option.???
    – vineet
    May 31, 2016 at 6:09
  • 1
    In your Menubar
    – Hashken
    Jun 1, 2016 at 6:53
  • @vineet_sah: There's no 'edit' in my menu bar. Instead, I right-click inside the terminal and select "Profiles -> Profile Preferences" Nov 21, 2016 at 20:06
  • 2
    what about with ubuntu server without UI?
    – RollRoll
    Mar 24, 2018 at 1:18
16

Since the question is now over three years old, I just want to post an update:

In Ubuntu 15.10 it is pretty similar to the accepted answer, there it looks the following:

  • Go to Edit -> Profile Preference -> Scrolling Tab.

  • Untick the box beside "Limit scrollback to:".

Disable "Limit scrollback to:"

1
  • Is there any danger to the unlimited setting? Like e.g. running out of memory?
    – a06e
    Oct 23, 2019 at 8:33
2

Supposedly Gnome terminal has an option for that, please check Edit->Profiles->Default->Edit->Scrolling->Scrollback

1

The other answers here are correct... unless you use the clear command. Sometime after Ubuntu 12.04, running clear also prevented scrollback, even if you have the terminal set to unlimited scrolling. This can be very frustrating.

For a discussion and workarounds, see How to stop `clear` from clearing scrollback buffer

1

Ubuntu 22.04

The default number of scroll back lines in Ubuntu 22.04 is 10000. You can change this to any number up to 2147483647 or disable it altogether. Both can be done either from the GUI or from the command line.

From the GUI

Open Terminal -> Settings (the hamburger button) -> Preference -> Profiles -> Unnamed -> Scrolling. There you will see Limit scrollback to. You can either disable it altogether or change the number of lines you want to scroll back like this:

Preferences - Profile Unnamed

From Command Line

The same thing can be done from the command line, using gsettings. Read more about how this works in this post: How to change gnome-terminal scrollback lines from command line.

Enable unlimited scrollback:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')/ scrollback-unlimited true

Limit scrollback to 250,000 lines:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')/ scrollback-lines 250000

You must log in to answer this question.

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