13

How could I scroll up and down the bash shell window (without the mouse or scroll bars, just using the keyboard)?

Shift+PageUp and Shift+PageDown acts like page up and page down.

But how could one scroll just one line up or down? Shift+Up and Shift+Down doesn't work.

4

Gnome terminal (and others) uses ctrl+shift+up and ctrl+shift+down to scroll one row.
But ctrl+shift should work in most other terminal emulators (like xterm or urxvt if not intercepted by windows managers or stuff.

  • Indeed, Left Ctrl + Left/Right Shift + Up/Down does the trick! (It doesn't work for me with Right Ctrl.) – Misha Moroshko Oct 28 '11 at 13:20
  • @MishaMoroshko Probably because VirtualBox. – user202729 Jun 21 '18 at 8:18
16

If using iTerm2, you can see all shortcuts in Preferences Panel.

Move one line up in scrollback buffer

Move one line down in scrollback buffer


You can also add your own shortcuts. I regularly use these 2 for example:

Move one page up in scrollback buffer

Move one page down in scrollback buffer


And that's how it looks like:

enter image description here

  • the keys you use for scrolling a page up in the scrollback buffer are now default for "scrolling back to the previous command". Add that to the answer? – Cat Boss Jun 24 '17 at 15:09
0

Just tried this myself on Ubuntu 12.10. Scrolling back linewise works using ctrl+shift (both, for left and right buttons) and up and down keys of the keypad with numlock activated (meaning when you don't use a modifier key, numbers will be typed)! It does not work for the normal up and down keys or keypad keys with numlock deactivated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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