How to page up/page down in Terminal?

nermal0

macrumors regular
Original poster
May 31, 2006
127
5
Germany
Hi!

This is a very simple question from a Mac newbie: how do I scroll pagewise in Terminal using the keyboard? I need to "scroll back" in the terminal pagewise and I also need to scroll up/down pagewise in manpages.

Maybe getting a laptop with Page Down/Up keys missing wasn't such a great idea after all ;)

Thanks,

Christoph
 

nermal0

macrumors regular
Original poster
May 31, 2006
127
5
Germany
it does the trick for the scroll buffer, thanks.

But how do I send a "Page Up / Page Down" to programs running in the terminal (e.g. man)?

Thanks,

Christoph
 

plinden

macrumors 68040
Apr 8, 2004
3,968
3
Same as in Unix - "b" key back, space bar forward.

I waited till I got home to test this out before answering - Fn+arrow up/down always acts like page up/page down using the key board, ie. it acts on the screen scroll.
 
  • Like
Reactions: chrisnowlan

gekko513

macrumors 603
Oct 16, 2003
6,302
1
ctrl+f and ctrl+b also takes you a page down and page up respectively in things like "man" and "less". It seems to do exactly the same as space and b, but in case there are some situation where they don't work the same, I thought I'd mention it.
 

nermal0

macrumors regular
Original poster
May 31, 2006
127
5
Germany
Okay, it works for "less", but how can I really send a Page Up / Page Down key to an editor like emacs, jed or nano?

Thanks,

Christoph
 

mstoiber

macrumors newbie
Nov 16, 2011
1
0
For some reason the terminal is mapping meta (usually option/alt) to the esc key. If you use esc + v you can page up, but to page up multiple times you have to release esc and hit esc + v again (as opposed to just continuing to hit v). Kind of annoying, but at least you can page up in emacs in a terminal window on a macbook. I just wish I hand't spent the last hour trying to figure this out, and I am kind of regretting getting a computer with out a page up and page down now. Hope this helps.
 

transisthor

macrumors newbie
Jun 24, 2013
1
0
You can optionally download a different program.

I had the same problem and now use iTerm (free), and I can page up and down in vi, I didn't try emacs.

I'm sure there's more if you search. Terminal is apparently garbage.

EDIT: using Fn + up and down (so it's.. ok..)
 

benwiggy

macrumors 68020
Jun 15, 2012
2,186
15
Old thread, but I can't believe no one has posted the correct answer.

If you've viewing man pages, or using "less" to view screensful of data, use "d" for down and "u" for up.
 

dyn

macrumors 68030
Aug 8, 2009
2,708
384
.nl
Because it only works in applications that use the Vi navigation keys. It doesn't work in irssi for example. I find shift-pgup and shift-pgdn to be the most useful as it works in almost any application. Pgup and pgdn are for scrolling back the Terminal buffer. You can change this in the Terminal settings though (reverse it for example: pgdn/up for man pages, shift-pgdn/up for buffer).
 

karnadi

macrumors newbie
Jul 3, 2013
1
0
In the Terminal, use:
- Shift + Fn Up for PageUp,
- Shift + Fn Down for PageDown,
- Shift + Fn Left for Home,
- Shift + Fn Right for End

That's it. Simple. Works for all cases l know. I got this information from other forum and I think I should share it here :)
 

KarenHeart

macrumors newbie
Jul 30, 2013
1
0
Shortcuts for Safari (and maybe others)

I just found that Command + Up takes you to the top of the web page, Command + Down takes you to the bottom. Option + Up/Down takes you one page back/forward. This last shortcut also works for .pdf files in the Preview app, but the Command shortcut doesn't. HTH.
 

dyn

macrumors 68030
Aug 8, 2009
2,708
384
.nl
This is a topic about Terminal. The keys are different in this application. Cmd-arrow up/down in Terminal is scroll 1 line up/down. You need to use shift-pgup and shift-pgdn to scroll 1 page up/down in something like a man page. You use pgup/pgdn to scroll through the Terminal buffer. Top/bottom would be home/end when you want to scroll the Terminal buffer or something like g and shift-g when using man.
 

szandor

macrumors newbie
Sep 19, 2007
8
0
In the Terminal, use:
- Shift + Fn Up for PageUp,
- Shift + Fn Down for PageDown,
- Shift + Fn Left for Home,
- Shift + Fn Right for End

That's it. Simple. Works for all cases l know. I got this information from other forum and I think I should share it here :)
bless you my child.
 

puh

macrumors newbie
Oct 31, 2014
13
13
In the Terminal, use:
- Shift + Fn Up for PageUp,
- Shift + Fn Down for PageDown,
- Shift + Fn Left for Home,
- Shift + Fn Right for End

That's it. Simple. Works for all cases l know. I got this information from other forum and I think I should share it here :)
And starting with Yosemite it seems to be
- Fn Up for PageUp,
- Fn Down for PageDown,
- Fn Left for Home,
- Fn Right for End
At least in emacs.