Recently I was reading about techniques of encryption. I found crypt and encrypt commands. When I read man page it displays ok but when I run some examples system displayed message about bash command not found. I am working on RHEL 5.9.Is this behaviour of system is regular OR my OS is corrupted?. Please guide.
You can get a quick idea of what a given manpage describes based on its section. Commands available to the shell are in section 1 or 8 (the latter for administrative commands, often only useful for
Note too that you can have section 1 or 8 manpages installed without having the corresponding command, so even if a manpage is in section 1 there is still no guarantee that the command is available. In some cases, manpages exist in different sections with the same name; you can specify the section you want:
man 1 printf man 3 printf
See What do the numbers in a man page mean? for details of the sections.
No, your system is not broken. Many man pages exist to provide reference, but not necessarily about executable commands. The pages in the man system could contain:
Commands that are not available to the user. A common command (if the package sudo is installed) is
visudo. It has a man entry in
man visudo(as it should). But it is available only to the root user (as it should be). No user could execute it (without sudo), so, an user (prompt
$) can not execute it and usually is not in the path of any other user except root. Thus:
$ visudo bash: visudo: command not found
$ sudo visudo
or (as root,
General concepts like:
man man man ascii
manis also an executable, and the one to call man pages. Its manual page describe the concept of what a
sectionmeans to the man system.
That is important for concepts like
$ man -f passwd passwd (1) - change user password passwd (1ssl) - compute password hashes passwd (5) - the password file
That shows that three pages in sections
1sslsection will be available only if the
opensslpackage has been installed. The man page for section 5 describe a file format, the
/etc/passwdfile format. The full list of section 5 (for linux) may be seen here or here. That may have (depending of your OS) entries like:
Which is not an executable, nor is it expected to be (well, not yet).
The man entry may not even exist as a command or a file.
If the package openssl is installed, there are man pages like:
Which explain how a part of the openssl command will work, it is called as
openssl dgst. There is no
Which explain what is an ascii character.
Programming (C language) functions
Many c language functions have a man page:
There is no command, nor is it expected to exist, called
But some pages exist in several sections:
$ man -f printf printf (3) - formatted output conversion printf (1) - format and print data
There is a command (section 1) called
printfand there is a page for the c language function also called