I want to read the manpage
for the application cutechess
, however I do not want to install it, so is there any way to get and read a manpage
for a package without installing it? That is through the command-line and not a browser (a Terminal browser such as lynx
does not count). This method should work for all packages and not be specific to cutechess
though. I am running Ubuntu GNOME 15.04.
Asked
Active
Viewed 153 times
1
3 Answers
4
A manpage for cutechess can be found here This is the results of a simple search for manpage
and cutechess
The script below (taken from here) can be used to read manpages from the internet, in a terminal window. Usage is dman <topic>
, if the script is saved as dman
#!/bin/sh -e
###############################################################################
# This is the Ubuntu manpage repository generator and interface.
#
# Copyright (C) 2008 Canonical Ltd.
#
# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,
# based on a framework by Kees Cook <kees@ubuntu.com>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# On Debian-based systems, the complete text of the GNU General Public
# License can be found in /usr/share/common-licenses/GPL-3
###############################################################################
. /etc/lsb-release
while true; do
case "$1" in
--release)
DISTRIB_CODENAME="$2"
shift 2
;;
*)
break
;;
esac
done
PAGE=`echo "$@" | awk '{print $NF}'`
MAN_ARGS=`echo "$@" | sed "s/\$PAGE$//"`
# Mirror support of man's languages
if [ ! -z "$LANG" ]; then
LOCALE="$LANG"
fi
if [ ! -z "$LC_MESSAGES" ]; then
LOCALE="$LC_MESSAGES"
fi
if echo $LOCALE | grep -q "^en"; then
LOCALE=""
fi
URL="http://manpages.ubuntu.com/manpages.gz/"
mandir=`mktemp -d dman.XXXXXX`
trap "rm -rf $mandir" EXIT HUP INT QUIT TERM
for i in `seq 1 9`; do
man="$mandir/$i"
if wget -O "$man" "$URL/$DISTRIB_CODENAME/$LOCALE/man$i/$PAGE.$i.gz" 2>/dev/null; then
man $MAN_ARGS -l "$man" || true
fi
rm -f "$man"
done
You can also download the script with:
wget http://manpages.ubuntu.com/dman

terdon
- 100,812

Charles Green
- 21,339
2
The dman
script which should allow you to browse the Ubuntu man pages found at http://manpages.ubuntu.com/dman can be fetched via the command line using wget
:
wget http://manpages.ubuntu.com/dman
Make sure the working dman
is in your path and executable, and you should be able to call it like any other command line utility.

Arronical
- 19,893
-
Thanks! I should be able to remember there's a command to get webpages, but for some reason I never do. I corrected your text for the weblink. – Charles Green Oct 21 '15 at 15:46
-
Thanks @CharlesGreen , overly speedy fingers by me there! I rarely remember either, looking at the manpages just prompted an 'I wonder' moment. – Arronical Oct 21 '15 at 15:49
1
All of Ubuntu's man
pages, for all currently supported releases, are available through Ubuntu's online man
pages

waltinator
- 36,399
-
Does seriously nobody listen? I don't want the answer to be to go into a browser and to go to a website, I want the answer to be fully using the command-line (and a command-line browser such as
lynx
does not count). Is there really no way to do it this way? – Oct 21 '15 at 15:27 -
How do you expect such a thing without actually downloading the relevant application? Once you do that, pipe the man output to a file so it stays with you and then delete the app. – DK Bose Oct 21 '15 at 17:02
lynx
does not count) as I specified? – Oct 21 '15 at 15:23dman
will allow you to read manpages from the internet, using a terminal interface. It can be found at manpages.ubuntu.com, which, unfortunately, you will need a browser to find :) – Charles Green Oct 21 '15 at 15:27wget http://manpages.ubuntu.com/dman
and thenchmod +x ./dman
.... or iswget
forbidden too ;-)? – Rmano Oct 21 '15 at 15:44./dman cutechess
?.
is not normally in the PATH for safety reasons. – Rmano Oct 21 '15 at 15:54./dman <topic>
– Arronical Oct 21 '15 at 15:55bikeshed
– Charles Green Oct 21 '15 at 15:59