Is there any way to quickly scroll through text-heavy output in Terminal such as man
pages ? Using the up and down arrows only move the screen one line at a time; is there any way to scroll faster?
10 Answers
If I understood you correctly, you want to skim through manual pages more efficiently.
By default, man
uses less
as its pager. In less
, you can use:
- Space or f or Control ⌃-f to advance one page
- d or Control ⌃-d to advance half a page
- b or Control ⌃-b to go back one page
- u or Control ⌃-u to go back half a page
You can get the full list of less
keyboard commands in its manual page. If you don't like the default pager, you can set MANPAGER
or PAGER
environment variables to specify a different program for controlling the pagination of man pages that are longer than one screen.
-
12
-
3
/
starts search mode, which lets you jump to a word of your choice.– user588Sep 7, 2011 at 3:29 -
2
-
1Also, for better experience enable
option
asmeta
key.Terminal preferences > Profiles > Keyboard > Use Option as Meta key
– DanSkeelJun 25, 2015 at 11:11 -
1
You can open man pages in a single, scrollable window from Terminal's Help menu. Just type the command into the search field in the Help menu, then click the command in the search results to open its man page. It may occasionally take a few seconds for the command to appear in the search results.
You can also find most man pages online, with Apple-specific man pages found on apple's developer library. I generally google with apple man [command]
replacing [command]
with the actual command. One nice thing about this method is you can easily bookmark man pages you use frequently.
-
3Searching for man pages in the Help menu works in Snow Leopard (10.6) as well. Lion has a number of enhancements: There are convenient commands in the Help menu to look up man pages for selected text, and they're available in the contextual menu, as well as Services so you can use them from other applications (you have to enable them in System Preferences > Keyboard > Keyboard Shortcuts > Services). You can also Command-Double-Click to open man page references "open(1)" and URLs "x-man-page://1/open" for easy navigation between man pages. Sep 8, 2011 at 12:13
-
2If there is no selection, the Help menu commands will look to the left of the cursor for a search term or man page reference. I use this all the time to look up a command after beginning to enter it on the command line. The "Open man Page" commands are the equivalent of
man
and "Search in man Pages" are equivalent toapropos
. The Help menu and contextual menus recognize man page references in the form "1 open", "open 1" and "open(1)", as well as "x-man-page://1/open". Sep 8, 2011 at 12:15 -
2Man page terminals use the "Man Page" settings profile, so you can customize their appearance. Because the default window position is remembered separately for each profile, you can place man page windows conveniently on screen and new ones will show up in the same location (I place them at the right edge of the display, so they don't cover my primary terminal windows). Sep 8, 2011 at 12:21
-
1Also, if there are no running processes, Terminal supports a few pager commands. These are especially convenient for reading man pages: Space/Shift-Space = Page down/up, f/b = Page down/up, Return = Line down, Up/Down Arrow = Line up/down, </> = Home/End Sep 8, 2011 at 12:21
-
Thanks @ChrisPage — meta.apple.stackexchange.com/q/1247/8546 proposes hyperlinking of x-man-page:// URLs. Mar 31, 2012 at 17:22
Shift ⇧-Page Up ⇞ and Shift ⇧-Page Down ⇟ will move man pages a page at a time.
(On a laptop or other smaller keyboard, the keystrokes are usually Shift ⇧-Fn-Up Arrow ↑ and Shift ⇧-Fn-Down Arrow ↓.)
-
1For me, on OSX 10.8, the key combinations are [fn]-[up] and [fn]-[down] respectively. Oct 18, 2012 at 22:06
-
For non-Apple specific commands which tend to be the same across various UNIX platforms something I do is Google man [command]
in a browser. The top result will almost always be an HTML-ified man page.
This answer gets around your question: Install Bwana.
This will open man pages in the browser. I've used this for years and it's one of my favorite additions for Terminal functionality.
I would recommend ManOpen, which allows you to open a man page in a normal text window.
You can also create an alias (let me know if you need help with this) using
pman() {
man -t "${1}" | open -f -a Preview
}
I have an app 'man reader' that lists all man pages on left and you can select one and it shows the man page in a Mac window. Runs on Sierra and is pretty nice. Can scroll man page up or down.
In VSCode on Mac
- g to go to the beginning of man pages.
- G to go to the end of man pages.
-
-
@Alper Hi, Alper. I meant in the
Terminal
tab of panel view in VSCode. Thanks.– hustnzjAug 24, 2022 at 13:22
h
while in man page to see all shortcuts