Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishalbelsare/af638e3ba6967e3b76023b0b44a0e708 to your computer and use it in GitHub Desktop.
Save vishalbelsare/af638e3ba6967e3b76023b0b44a0e708 to your computer and use it in GitHub Desktop.
CLI: Scrolling in the Linux Console (ttys)

Scrolling in the Linux Console (ttys)

Scroll Up: Shift + Page Up

Scroll Down: Shift + Page Down

The scrollback buffer is quite short in Linux consoles, and the scrollback buffer is not stored on system RAM, but VGA RAM. The buffer is also lost on switching ttys. There was a kernel patch to fix this, but not yet accepted.

You can change the size of the scrollback buffer by recompiling the kernel with some options: http://gradusdesicus.blogspot.com.au/2009/01/increasing-scrollback-buffer-in-tty.html

You can read what is currently on the screen of a tty by reading /dev/vcs. The /dev/vcs refers to the current tty on the screen, but there's also /dev/vcs1 and /dev/vcs2 referring to tty1 and tty2.

Those special files do not contain the scrollback buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment