I'm using CentOS 5.4 servers installed in a VMWare virtual machine with no X.Org server installed, so all access is via command line and the Linux terminal. I use Shift + Page Up to view the scrollback buffer, but its size is very limited.

How do I increase the size of the scrollback buffer?


4 Answers 4


Hmm...didn't notice how old this was until I was almost finished. Since this area isn't well documented anywhere and I'm almost done typing answer, I'll soldier on anyway.

If you are using the Framebuffer console, it's possible to use the fbcon=scrollback: parameter at boot time to increase the size of the scrollback. You're probably not using that though.

Instead you're likely going through the standard VGA console. There's another fork in the road here. If you have a kernel compiled with the VGACON_SOFT_SCROLLBACK parameter enabled, it's possible to increase the scrollback of the VGA kernel modules, by changing VGACON_SOFT_SCROLLBACK_SIZE. But you'll have to recompile your kernel to do it. See an earlier answer for an example of the things to change, and I Need to Build a Custom Kernel for details of how to do it on CentOS. I consider it unlikely you're willing to go through all that, but if you're already building a custom kernel it may be easy to you.

If VGACON_SOFT_SCROLLBACK is off, you don't have this option. In that case, the scrollback is actually stored in the VGA memory, which makes it very limited. The only thing you can really do in that case is reduce the number of virtual terminals started by default.

The standard CentOS kernel is built with these options:


So you're probably looking at the "recompile the kernel with larger CONFIG_VGACON_SOFT_SCROLLBACK_SIZE" as the main option. Maybe you can switch to the framebuffer driver instead.

When faced with this problem, rather than fix the kernel scrollback I would just use screen instead. Get lots of other benefits too.


Here's an article that talks about setting the size using a framebuffer boot parameter.

Quoting briefly:

The following example refers to GRUB but can be easily adapted to LILO. In GRUB's 'menu.lst', find the appropriate kernel line, and:

a. delete option 'vga=xxx', if present
b. append option 'video=vesabf' or whatever fits your hardware
c. append option 'fbcon=scrollback:128'

The kernel line would then look something like the following;

kernel /vmlinuz root=/dev/sdb5 video=radeonfb fbcon=scrollback:128


If you have started a shell session in Konsole, do the following:

Konsole > Settings > Edit current profile > Scrolling > Scrollback

You may temporarily increase the amount of lines in the scrollback.

  • That's not relevant to OP's question, which specifies no X.org server. May 20, 2021 at 8:16

IMHO, You need to execute this command :

screen -h 5000

So that the buffer will be of 5000 lines.

Of-course, you can specify the number of lines as per your need.

  • Doesn't work on the Native Terminal. Tried it and nothing was changed.
    – japzone
    Dec 16, 2012 at 23:41

You must log in to answer this question.

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