In order to enjoy the computer world, mastering some common unix commands is a must.

The UNIX online manual, known as the man page, documents low-level UNIX command-line tools, APIs, and file formats.

Here, I summarize three ways which are not multual exclusive but complementary to view man page.

Terminal — Traditional

By default, man typically uses a terminal pager program such as more or less to display its output. But reading the content in the terminal is a bit boring and inconvenient for newbee.

To understand a command quickly, you’d better to use TLDR pages.

Online services — Popular

Quite a few websites offer online access to manual pages from various Unix-like systems.

  • mdoc.su
  • man7.org
  • A ManKier service provides a very extensive manual page list, and integrates the TLDR pages too.(Recommended if you are online)

DIY — Fantastic

If you want to view the man page of your os in browser at anywhere and anytime, you can add a function to your shell profile at ~/.your_shell_profile or wherever your shell profile is, save and source it:

function gman() {if [[ $# -eq 0 ]]; then
    echo 'No arguments supplied'
  else 
    man -a "The $1" | col -b > "/tmp/The $1"
    open -a "/Applications/Google Chrome.app" "/tmp/The $1"
  fi
}
Copy the code

Then use gman find, the a new page containing all the sections of find will appear in the browser.

Note: Some commands which are not avaiable on the local computer will not appear in the gman result. So It’s better to use the Mankier or tldr service when network is available.

Awesome.