Mon 25 Jul 2016


Getting help in linux

Commands without man pages

Some commands don't have man pages.

Find out what they are with which thingy:

  • If they're a built-in, type the shell's man page.
  • If they're an alias, use alias thigny to find out what they actually point to.
  • If they're a function, use typeset -f thingy to see the definition.


If a command is an alias

Man pages

Type man thingy.

There may be multiple man pages with the same name. They are separated by the number of the section they belong to. Type man N thingy.


M-x man command in Emacs is a nice way to look at them.


Type man N intro to see the intro for a numbered section and find out what kind of commands go in there.


man is backed by a database of some sort, which needs to be build.

On Debian this appears to be handled automatically for me.

Manual Man

You can run man -M MANDIR # filename to open a particular file in the man viewer.


Shows description for man pages matching the name

whatis thingy is the same as man -f thingy.


Search man page description for keywords

apropos thingy is equivalent to man -k thingy.


Being surrounded in square brackets [] makes an argument optional.

Braces {} show a list of choices.

Angle brackets <> may be used to indicate mandatory arguments.


Mostly I avoid using dpkg directly, and use the apt command instead.

Here are a couple of useful commands which aren't exposed in apt.


dpkg-query -S pattern* finds packages which own a given file.

list files

dpkq-query -L package finds files installed by a package.


Get this as an apt package.

It's really useful.


This is the GNU system. As a result, all the GNU man pages are pretty sparse/basic.

You can use info from inside Emacs.

C-h i to access info.