OS X El Capitan: man, command not found Today I was trying to update openssl in my MacBook Pro with El Capitan 10.11.2.
I don't know where I made a mistake but it seems I have accidentally disabled man. In fact, if I launch man &lt;something&gt; or man man or simply man it says --> -bash: man: command not found. Is there a way to restore it?

Some commands:

which man --> nothing

file /usr/bin/man --> man is a directory

I am afraid there's not an executable anymore.
In fact, with ls -al /usr/bin/man I got

total 0
drwxr-xr-x     6 root  wheel    204 30 Dic 18:15 .
drwxr-xr-x  1063 root  wheel  36142 30 Dic 20:51 ..
drwxr-xr-x    46 root  wheel   1564 30 Dic 18:15 man1
drwxr-xr-x  1025 root  wheel  34850 30 Dic 18:15 man3
drwxr-xr-x     4 root  wheel    136 30 Dic 18:15 man5
drwxr-xr-x     3 root  wheel    102 30 Dic 18:15 man7
Apple publishes the source code for the open source parts of OSX. So the source for "man" is retrievable from https://opensource.apple.com/tarballs/man/ .  The latest version (as of this writing) is v1.6c. Provided you have at least the Command Line Tools installed (you can run xcode-select --install to get them if you don’t):

curl -LORf 'https://opensource.apple.com/tarballs/man/man-16.tar.gz'
tar -xzvf man-16.tar.gz
cd man-16/man

# Undo an Apple patch that adds a dependency on 'xcselect.h',
# which is something that Apple doesn't appear to distribute.
patch -R -p0 &lt;../patches/PR11291804-xcode.diff

./configure --prefix=/usr/local
make
make install


That done, the man binary should be available at /usr/local/bin/man. Also note that you might need to run hash -r to clear the hash table of any instances of /usr/bin/man that may be lingering there from the last time you ran man before the addition to /usr/local/bin/ will be picked up.