Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
19  
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
1  
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
1  
@MichaelMrozek That was a short "Winter". –  jordanm Jan 6 '13 at 1:54

5 Answers 5

up vote 35 down vote accepted

In terminal (not graphic emulator like gterm) works Shift+PageUp or Shift+PageDown

share|improve this answer
1  
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
1  
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.

share|improve this answer

You can use the scroll mode: Use Ctrl-B then [ to enter it. Use q to exit scroll mode.

And there is tmux, like screen.

share|improve this answer
    
Not in any terminal I've ever used. –  psusi May 14 at 22:43
    
@psusi Then use tmux - terminal multiplexor - instead of down-voting. Did you down-vote the screen terminal multiplexor answer, too, because you have not used it? Be more responsible. –  Christopher May 15 at 0:16
    
If you meant to say this is what you can do when using tmux, you should reword your answer, because the way it is written, you are saying this works in any terminal, and as an aside, you might be interested in tmux. –  psusi May 16 at 18:29
    
@psusi So edit it however you like, as was already done. Be more responsible. –  Christopher May 16 at 19:23
    
Oh the irony. How about you be responsible for your own answer? –  psusi May 17 at 0:37

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 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 others use a very limited history buffer. In the latter case, you may want to increase the limit.

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

share|improve this answer

Your Answer

 
discard

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.