Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Typing man alias gives me

No manual entry for alias

The same thing goes for export and eval. At first I thought it only happens to shell built-in commands but man echo gives me the man page.

Except for googling, is there a way that I can view the documentation of those commands? If not, is there a way to "install" those missing man pages?

share|improve this question

5 Answers 5

up vote 6 down vote accepted

You probably have the man page for echo because most systems have an echo binary in /bin, even though most shells provide a built-in anyway; you're seeing the man page for that binary. The man pages for all the other commands you're missing are in the POSIX Programmer's Manual (man section 1P). How to install it will depend on your distro; on Gentoo they're in the sys-apps/man-pages-posix package

share|improve this answer
1  
on ubuntu it is in the manpages-posix package, and thanks for the bit about /bin/echo as well –  phunehehe Sep 10 '10 at 8:53

man information for built-in commands usually are available in the related shell man page. Try man bash.

share|improve this answer
    
for bash builtins you can also use help export, etc. –  hop Sep 10 '10 at 10:03

Builtin commands can be easily found by checking the man page of your current shell:

In the man page of bash, you'll find:

alias [-p] [name[=value] ...]
       Alias with no arguments or with the -p option prints the list of
       aliases in the form alias name=value on standard output. When
       arguments are supplied, an alias is defined for each name whose
       value is given. A trailing space in  value causes the next word to
       be checked for alias substitution when the alias is expanded. For
       each name in the argument list for which no value is supplied, the
       name and value of the alias is printed. Alias returns true  unless
       a name is given for which no alias has been defined.

When in doubt, run which alias when it reports builtin, or it can't be found in $PATH, there's a good chance it's a builtin, so check the appropriate man pages.

share|improve this answer

alias, export, and eval are all part of man builtin on Mac OS X and, I assume, on other BSD systems.

On OS X, the man pages for the builtin commands are all aliased to builtin, so if I type man alias it will pull up man builtin. The problem though is that man builtin doesn't really provide information on the individual commands. Therefore, to get info on alias, you have to use help alias.

While I prefer reading man pages from a terminal prompt, if missing from a system, I'll go to http://man.cx/ as it's pretty comprehensive.

share|improve this answer

You can get information about bash built-in commands with help, for example help alias or help export.

share|improve this answer
    
Good, and if you prefer the man format you can do help -m, like help -m alias –  Philomath Jul 20 '11 at 16:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.