To determine whether a command is built into Linux, you can use the Type command, and only the Linux built-in commands can be used to get help.
# Type cd
Output: CD is a shell builtin
Note that this command is a built-in command from the system, so you can use the help command to get assistance.
# Help Command name
< two >, external commands How to get help documents:
(1) The first option is to use--help
Format: # command name--help
Example: # mkdir--help
(2) You can use the man command to get complete help for a command
Format: # man command name
Example: # man mkdir
The man command is to invoke the less tool to display the document, and man's specific operation method is the same as less.
Common uses of Linux man:
Man-section cmd:directlySpecify a Search man page in a specific section, such asMans 5 passwdHelp for direct access to file format version
man-a cmd:Openhelp with the same name in all sections, for example Man–a passwd, you will first enter a passwd (1) command version passwd Help, you press the Q key will enter passwd (5), passwd configuration file format Help
man-aw cmd:ShowAll cmd file paths for all manuals, such as Man-aw passwd is
/usr/share/man/man1/passwd.1.gz
/usr/share/man/man5/passwd.5.gz
man-m cmd:Specify the search path for the manual file, such as Man-m/home/mysql/man MySQL display is the help of your installed MySQL, not the system comes with the old version of MySQL help
Man cmd| col-b > Cmd.txt: Output man manual information to a text file
Man Simple introduction:
The man in Linux is very powerful, and the manual is divided into sections, which can be used to specify a different section to navigate, with each section having the following meanings:
Man command format:
Man [option] Name:name is generally the name of the Help document, corresponding to command name, function name, or configuration file name (with suffix!) ), such as
Man nsswitch.conf: View the Help documentation for the/etc/nsswitch.conf file
Man networks: View the Help documentation for the/etc/sysconfig/networks file
to view the help documentation for a specific language version:set the environment variable LANG=ZH_CN before executing the man query
Man 's configuration file/etc/man.config:
If you don't want to specify the path with-M every time man cmd, you can modify the configuration file to add content such as
Manpath/home/mysql/man
Linux get help information for commands