How to read package description or man page without installing?
How can I get information about a package before installing it, from the terminal?
I mean something like man
pages, but accessible even before the package is installed.
dman
Retrieves Manual Pages
In practice, viewing a package's brief description (as mchid suggests) is usually what you'll want to see, to decide if you want the package. However, if you like you can view a manpage provided by a package that has not yet been installed, using the dman
utility.
dman
is provided by the bikeshed package. You can install that in the Software Center, or with sudo apt-get install bikeshed
.
Then use dman
like man
.
dman
is a script that retrieves manual pages over the Internet and displays them, so you have to be connected to the Internet to use it successfully. (But you probably are, because in your specific scenario you're about to install a package.) It also often runs slowly, so be prepared to wait several seconds.
If dman
's database doesn't have your release, you can specify another.
Due to a bug dman
doesn't work right on some releases of Ubuntu. For now you can get around the problem by viewing another release's version of the manpage you want (this workaround was suggested by Marius Gedminas in a comment on the bug report). You use the adjective part of the codename, in all lower case (e.g., precise
from 12.04 Precise Pangolin, trusty
from 14.04 Trusty Thar). For example:
ek@Io:~$ dman sl # doesn't work on Vivid, produces no output
ek@Io:~$ dman --release trusty sl
SL(6) Games Manual SL(6)
NAME
sl - display animations aimed to correct users who accidentally enter
sl instead of ls.
SYNOPSIS
sl [ -alFe ]
DESCRIPTION
sl Displays animations....
Alternative: Browse Manual Pages with a (Text-Based) Web Browser
Of course, you can also simply browse the manpages on the web. If you want to do this from the command-line, you can use a text-based web browser.
If you like, you could even define a function in .bashrc
so you have a command that opens up a text-based web browser and searches for the term passed as its argument:
wman() { links2 "http://manpages.ubuntu.com/cgi-bin/search.py?q=$1"; }
For that particular function definition to work, the links2 package must be installed. It will cause the wman
function to be defined automatically in each newly created interactive shell, but not in shells that were started before .bashrc
was edited (you could simply run the function definition in those shells, though).
Then I can search for manual pages, and select between pages in different sections of the manual, for whichever Ubuntu release's version of the manual I like:
ek@Io:~$ wman chmod
Ubuntu Manpage: Searching (p1 of 2)
Ubuntu manuals
_____________________ go
+------------------------------------------------------------------------+
| lucid precise trusty utopic Section Description |
| 10.04 LTS 12.04 LTS 14.04 LTS 14.10 |
| chmod(1), chmod(1), chmod(1), chmod(1), (1) - Executable |
| chmod(1) chmod(1) chmod(1) chmod(1) programs or shell |
| commands |
| chmod(2), chmod(2), chmod(2), chmod(2), (2) - System calls |
| chmod(2) chmod(2) chmod(2) chmod(2) (functions provided by |
| the kernel) |
| (3) - Library calls |
| chmod(3) chmod(3) chmod(3) chmod(3) (functions within |
| program libraries) |
| . . . . (4) - Special files |
| (usually found in /dev) |
| (5) - File formats and |
| . . . . conventions eg |
| /etc/passwd |
| . . . . (6) - Games |
| (7) - Miscellaneous |
| . . . . (including macro |
| packages and |
http://manpages.ubuntu.com/
not as extensive as manpages but I think this is what you are looking for:
apt-cache show <packagename>
you can also search for related packages:
apt-cache search <searchtag>