Skip to content

Instantly share code, notes, and snippets.

@CMCDragonkai
Created February 10, 2016 08:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save CMCDragonkai/84960ca3f0242346e78e to your computer and use it in GitHub Desktop.
Save CMCDragonkai/84960ca3f0242346e78e 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.

@tricantivu
Copy link

Short and simple, thanks!

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