I want to provide URL links to man page content at apple.com as an authoritative source of information. Describing and quoting the local man page is awkward.
Does Apple provide man pages on the web?
I want to provide URL links to man page content at apple.com as an authoritative source of information. Describing and quoting the local man page is awkward.
Does Apple provide man pages on the web?
Hello from the future world of 2022!
As benwiggy mentioned below, the short answer is https://ss64.com/osx. It's the only reasonably up-to-date, online-viewable, searchable, and cross-referenced repository of macOS man pages that I'm personally aware of right now.
That site's a fantastic resource for Windows scripting languages, too, if you are of that persuasion. If it has helped you, and you're feeling magnanimous, maybe buy the site's maintainer, Simon, a beer, because he's been hosting that site and answering posts in the forums for decades.
Here are some other options, though:
site:opensource.apple.com/source stat.1
man in the terminal?It's when you don't have a Mac that these resources are useful, for example, when writing shell scripts which need to work on Linux and macOS/BSD.
In that regard, the Heirloom Project's man pages can also be helpful for ascertaining what is the lowest common denominator behavior (e.g., which options are definitely supported) for many "Unix toolbox" commands.
You can format the raw roff source of the man pages on opensource.apple.com into something human readable like this:
copy the "plain text" URL:
fetch that URL with curl and format it for viewing on-screen with groff:
# use 'wget -qO -' if you don't have 'curl'
curl -s https://opensource.apple.com/source/grep/grep-28/grep/doc/grep.1 \
| groff -man -T utf8 \
| less
Some side notes about that groff command:
-rLL=${COLUMNS}n to use the full width of your terminal, if 80 columns doesn't do it for you; the man command usually does some magic to autodetect this from your terminal size (reference)groff -man -T ps > ~/Desktop/grep.1.ps for that last part to get a beautiful PostScript manual page that you can open and print with Preview.app, if that's your thingThe old online index seems have to vanished. You can however find the source code of manual pages on https://opensource.apple.com/. This site hosts historical versions as well.
For example:
Unfortunately there is no overview of all manual pages, so you have to manually check directory indexes or use something like site:opensource.apple.com/source "ls.1" in DuckDuckGo or Google.
site:opensource.apple.com/source trick is brilliant. For a browseable list of all manual pages from all sections of the manual (albeit dating back to the OS X 10.9 days) see my answer below.
– Kevin E
Nov 09 '19 at 01:56
In the past, Apple provided these pages online, for example: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/ls.1.html for the ls command.
Source: Dr Drang
Now you would need to find them mirrored elsewhere or use https://archive.org
There are some MacOS man pages here, though I don't know how complete the list is.
I used to use this utility, Bwana, which converts man pages to HTML in Safari on-the-fly. It hasn't been updated for some time, though the source code is available.
You could also use tldr++
A quick an easy way to see a couple of examples of the use of a command.
Update to answer comment
Here are two examples, so one knows what it looks like.
So I'd say that it's a possible addition to the man-pages.
man. The interactive tldr++ apparently takes an env var e.g. env TLDR_OS=osx tldr cal (untested). https://github.com/tldr-pages/tldr-python-client takes a flag e.g. tldr --platform=linux cal vs. tldr --platform=osx cal show different flags ✔. Both take data from https://github.com/tldr-pages/tldr/ repo (e.g. pages.es/osx dir has Spanish OSX)
– Beni Cherniavsky-Paskin
Dec 05 '23 at 17:39
:/– Kevin E Nov 14 '19 at 16:08