man is the quick interface to online reference manuals. These are usually stored in /usr/share/man/manN/blah.gz, or similar. Most debian packages also come with a README.debian, which is stored in /usr/share/doc/blah/README.debian. Is there an automated reader for these files, that finds the appropriate README.debian, and opens it?

2 Answers 2


You can create a simple shell function and place it in your .bashrc:

readme() {
  if [ -e /usr/share/doc/"$1"/README.Debian ]; then
    "$PAGER" /usr/share/doc/"$1"/README.Debian
    echo "No README for $1"


$ readme vlc

$Id: README.Debian 1436 2008-08-31 23:06:34Z xtophe-guest $

Notes for anyone wanting to build Debian packages of VLC.

 - Default configuration is supposed to be latest unstable.

 - VLC does not link with libdvdcss by default, thus it will not depend
   on the libdvdcss packages. However it will use libdvdread that can
   optionally open libdvdcss if found. To build packages that link directly
   against libdvdcss, remove the --without-dvdcss flag in debian/rules.

$ readme foobar

No README for foobar

You can smarten it up a little when you look for other README files (like the compressed ones which are often present) if the Debian file does not exist. Or collect all README files and offer a choice from which the user can select which one to display.

  • You might want to replace less with "$PAGER" to mimic man.
    – Chris Down
    Dec 25, 2012 at 12:40
  • @ChrisDown Good point. I updated the snippet.
    – Marco
    Dec 25, 2012 at 13:13

The easiest way is to type zless /usr/share/doc/blah/ and press Tab. Less is the text viewer that man calls by default, and zless is a wrapper that automatically decompresses .gz files.

You may want to install the packages dhelp or dwww. Neither does exactly what you want, but dwww is close: it lets you browse all of a package's documentation via a local web server. Dhelp doesn't require a server but doesn't show all non-HTML documentation.

  • 1
    They're often not gzipped, also, presumably they can sometimes be in /usr/local/share/doc/, so it'd be good to automatically find the appropriate file, without typing it manually.
    – naught101
    Dec 25, 2012 at 9:54
  • 1
    @naught101 zless can read both gzipped and uncompressed files automatically.
    – user28222
    Dec 25, 2012 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .