If we're talking about a command you can run at the shell prompt, there should be a manual page:
$ man someprogram
If you get back something like No manual entry for foo
, you can try GNU info
instead:
$ info someprogram
Not all Unix and Unix-like OSes have GNU info on them, but a lot do, and it often gives more information about a given command than the classic man
page does.
If you do have info
and it doesn't know about the command, you will get something like No menu item 'someprogram' in node '(dir)Top'
at the bottom of the screen. Press Q to leave info
.
Programs are often owned by some package manager on such systems, and you can also ask the package manager about the program. For the sake of example, we will say that you are interested in someprogram
, and you're using a shell with the which
command. If the latter isn't available, you can give the path to the executable manually, like /usr/bin/someprogram
.
RPM-Based Linuxes (RHEL, Fedora, CentOS...)
First find out which package the program belongs to:
$ rpm -qf `which someprogram`
somepackage-1.2.3-4
Then ask RPM about the package:
$ rpm -qi somepackage
Name : somepackage
Version : 1.2.3
Release : 4
...etc...
DEB-Based Linuxes (Debian, Ubuntu, Mint...)
The pattern is the same as for RPM. First, find out who owns the file:
$ dpkg -S `which someprogram`
somepackage: /usr/bin/someprogram
Then ask about the package itself:
$ dpkg -s somepackage
Package: somepackage
Essential: no
Status: install ok installed
...etc...
Mac OS X
The "native" OS X package manager is somewhat of a hidden OS feature, and it isn't used for everything, but it's worth a try. The pattern is the same as above:
$ pkgutil --file-info `which someprogram`
volume: /
path: /usr/bin/someprogram
pkgid: com.example.bundles.somepackage
pkg-version: 1.2.3
...etc...
Then to get more info about somepackage
:
$ pkgutil --pkg-info com.example.bundles.somepackage
$ pkgutil --files com.example.bundles.somepackage
...etc...
If you have installed one of the third-party package managers (Homebrew, MacPorts, or Fink) there are similar commands to get information about packages they own.
If you're dealing with a program installed outside any of these systems, you're probably dealing with a GUI program that is happy to tell you all about itself using internal mechanisms. (About box, Help, etc.)
FreeBSD
Classically, the BSDs haven't used formal package managers, but over the past several years, FreeBSD has been slowly moving toward the use of pkg
, a.k.a. PkgNG.
It, too, shares the same usage pattern as the above systems:
$ pkg which `which someprogram`
/usr/bin/someprogram was installed by package somepackage-1.2.3-4
$ pkg info somepackage
somepackage-1.2.3-4
Name : somepackage
Version : 1.2.3-4
...etc...
Perhaps someday the vast majority of programs installed on a FreeBSD box will be installed via pkg
, but not today.
If you have a program installed via Ports, and you can figure out which Port installed it, you can probably get what you want with this:
$ cd /usr/ports
$ ls -d */somepackage
net/somepackage
$ cat net/somepackage/pkg-descr
objdump
will dump an entire program, but I hope you know assembly.gdb
is excellent (and if you have source code even better). The way your question reads though you want man pages, but from what you said about @jasonwryan suggests otherwise. – SailorCire Apr 05 '15 at 23:29