24

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.

1

3 Answers 3

7

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.

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

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

1
  • 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?
    – wildeyes
    Jun 24, 2017 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .