Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I scroll in bash using only the keyboard? If it's not possible in bash, are there any other shells that support this?

share|improve this question
This is not a feature of the shell, it's a feature of the terminal emulator. See What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'? What terminal are you using? – Gilles Jan 5 '13 at 17:22
It's kind of sad that four people considered this question good enough to spend a few minutes on an answer but no one bothered to vote it up. – Marco Jan 5 '13 at 19:15
@Marco I suppose there is a difference between seeing a question as "good", and seeing an opportunity to earn some rep (or maybe even a new hat). – jordanm Jan 5 '13 at 20:42
@jordanm Sadly, hats ended yesterday – Michael Mrozek Jan 5 '13 at 21:40
@MichaelMrozek That was a short "Winter". – jordanm Jan 6 '13 at 1:54
up vote 53 down vote accepted

In "terminal" (not a graphic emulator like gterm), Shift+PageUp and Shift+PageDown work.

share|improve this answer
I just tried this in the latest version of PuTTY (b0.62) and it works. Just for the reference. Cheers. – Mario Awad Jan 8 '13 at 21:55
Shift+Uparrow and shift+Downarrow also work for line at a time scrolling. – Joe Jan 13 '13 at 7:03

This depends on your terminal emulator, not the shell you are using. I personally use GNU Screen. From the description:

Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.

You can use C-a [ to enter scrollback mode. From here, you can scroll with the keyboard and even copy and paste. The mode can be exited from by using the Esc key.

share|improve this answer

i use the default terminal in ubuntu 14 (bash) and to scroll by page it is SHIFT + PAGEUP or SHIFT + PAGEDOWN to go up/down a whole page or CONTROL + SHIFT + UP or CONTROL + SHIFT + DOWN to go up/down by line.

share|improve this answer
Nice CTRL+SHIFT+UP, just like SHIFT+UP in Cygwin. – Jaime Hablutzel May 5 '15 at 23:41

In most terminals that I known you can use Shift+PageUp and Shift+DownDown for scrolling. Note that some terminals don't support scrolling, or use a very limited history buffer. In the latter case, you may want to increase the limit, if it is configurable.

As an alternative, use a pager; for example, less.

share|improve this answer

Keyboard: Apple/Mac

Terminal/Emu: OSX Terminal

Shell: bash

fn + up_arrow: page up
fn + down_arrow: page down
cmd + up_arrow: line up
cmd + down_arrow: line down
share|improve this answer
This adds nothing, appears to be mac specific (which would not be a bad thing if properly marked as such), and does not apply to bash but to the terminal emulator (which would be useful if we knew what it was). – hildred Aug 8 '15 at 15:51
I have no key marked fn, nor one marked cmd. – Anthon Aug 8 '15 at 17:32
@Anthon Because you don't use a mac? OP never specified operating system in the question. – DisplayName Jan 2 at 14:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.