Summary of common help man,whatis,info,help under Linux systems

Source: Internet
Author: User
Tags builtin what header

1, man

A interface to the on-line reference manuals, a query interface on the online reference manual, enables us to learn the process of China's longest one help command.

Grammar

Man [options] Parameter



The number parameter that follows the man command means:

1   executable programs or shell commands# executable or General command 2    system calls  (Functions provided by the kernel) #是系统调用, is a call to the functionality provided by the kernel, For example, a function that calls the kernel does not know what header file to add. 3   library calls  (functions within program libraries) #是库函数, GLIBC the standard C language library function calls 4   special files  (Usually found in /dev) #特殊文件, i.e./ Various device files under Dev 5   file formats and conventions eg /etc/passwd# Some text files or configuration file details help display the 6   games# game (less than basic) 7   miscellaneous  (including  macro packages and conventions),  e.g. man (7),  groff (7) #其他一些杂项的使用, such as Linux file system, network protocol , Ascii code description, etc. 8   system administration commands  (usually only  For root) #是系统管理用的命令, these commands can only be used by root, such as ifconfig9   kernel routines [non  Standard] #内核例程


Example 1,

#passwd命令的简单描述.

[Email protected] ~]# man-f passwdsslpasswd (1SSL)-Compute password HASHESPASSWD (1)-Update user ' s AUT Hentication TOKENSPASSWD (5)-Password file


Example 2,

#查看passwd命令的使用方法

[[EMAIL PROTECTED] ~]# MAN 1 PASSWDPASSWD (1)                                                          User utilities                                                        PASSWD (1) NAME        passwd - update user ' S authentication tokenssynopsis        PASSWD [-K] [-L] [-U [-F]] [-D] [-E]  [-n mindays] [-x maxdays] [-w warndays] [-i inactivedays] [-s] [--stdin] [username]  ...... 


Example 3,

#passwd文件中内容的具体意思

[[EMAIL PROTECTED] ~]# MAN 5 PASSWDPASSWD (5)                                                    linux programmer ' s manual                                                   PASSWD (5) name       passwd -  password filedescription       the  /etc/passwd   File is a text file that describes user login accounts for  the system.  it should have read permission allowed for        all users  (Many utilities, like ls (1)  use it to map  user ids to usernames), but write access only for the  superuser.   ...... 

Example 4,

#sysctl命令的简要说明

[Email protected] ~]# man-f Sysctlsysctl (8)-Configure kernel parameters at Runtimesysctl (2)-RE Ad/write System Parameters


Example 5,

#查看sysctl系统调用的有关帮助

[[Email protected] ~]# man 2 sysctlsysctl (2)                                                    linux programmer ' s manual                                                   sysctl (2) name       sysctl -  read/write system parameterssynopsis        #include  < unistd.h>        #include  <linux/sysctl.h>        int  _sysctl (Struct __sysctl_args *args);        note: there  is no glibc wrapper for this system call; see NOTES.    ......  


Example 6,

#查看sysctl在运行时配置内核参数的有关帮助

[[Email protected] ~]# man 8 sysctlsysctl (8)                                                      System Administration                                                     sysctl (8) Name       sysctl  - configure kernel parameters at runtimeSYNOPSIS        sysctl [options] [variable[=value]] [...]        sysctl -p [file or regexp] [...] description       sysctl  is  used  to   modify  kernel  parameters at runtime.  the parameters  available are those listed under /proc/sys/.  Procfs is        required for sysctl support in Linux.   You can use sysctl to both read and write sysctl data.



2, Whatis

The Whatis command common Tools Command Whatis command is used to query what functions a command performs and print the results of the query to the terminal. The Whatis command finds commands, system calls, library functions, or special file names that are specified by the command parameter in a database created with the Catman command. The Whatis command displays the header line of the manual section. You can then issue the man command to get additional information. The Whatis command is equivalent to using the MAN-F command.


Grammar

Whatis parameters


Instance

[[email protected] ~]# whatis cdcd  (1)                 - bash built-in commands, see bash (1) cd  (1p)               - change  the working directory[[email protected] ~]# whatis bashbash  (1)               - GNU Bourne-Again  shell[[email protected] ~]# whatis fdiskfdisk  (8)              - manipulate disk partition table[[email  protected] ~]# whatis manman  (1)                - an interface to the on-line reference  manualsman  (1p)               - display system documentationman   (7)               - macros  to format man pages




3,-H--help

External commands commonly used options, the general external command using these two options are more, some external commands may only h or--help, and some are both, specific people in the use of the process can be groped.



4. Info


The info command is a command that displays command help in info format under Linux.

The info page is better, easier to understand and richer than the man page, but the man page is really much easier to use. A man page has only one page, and the info page almost always organizes its contents into sections (called nodes), and each section may contain sub-extents (called child nodes). The trick to understanding this command is not only to learn how to navigate through a separate Info page, but also to learn how to switch between nodes and child nodes. It may be difficult at first to move between the nodes of the info page and find what you want, it is ironic: originally thought for the novice, something better than the Man command, but the requirements of the English level of everyone has a high demand, my English level is general, so seldom use info this command, If you have a good English, you can learn the command of info. Here are a few of its frequently used shortcut keys.

Knock? Key, it will display the common shortcut keys for info. N: Display (relative to this node) the document contents of the next node P-key: Display (relative to this node) the document content of the previous node U key: Enter the subject of the current command m key: Enter the name of the command after the M key to view the command's Help document G key: Hit the G key after entering the subject name, Go to the topic L Key: Go back to the previous visited page space key: Scroll forward one page backup or del key: Scroll backward one page Q: exit the info command?       Display the Help window        :     in the Help window      Ctrl-x 0       Close the Help window           Ctrl-x Ctrl-c  Close Entire  Info          q       exit  infon       Open with Ben   node  associated Next  Nodep       open previous  Nodeu  associated with this  Node        Open the previous  Nodel        associated with this  Node  Go back to the last visited  nodem or g  Select a menu item (node  name)         Enter the name of the specified menu and press ENTER. Opens the specified menu item associated with the  node space bar   Next page (pagedown  can also, next page from the last two of the current pageLine start)         next  Node  (if the current page is at the end of the  Node  document) del  key   Previous page (pageup  can also, the previous page starts at the beginning of the current page)         previous  Node  (if the current page  Node  start of the document)        b  or  t  or  Home  the beginning of the document (b   is  begining  meaning) e  or  End        the end of the document (b  is   ending ) ctrl-l   Refresh the current page and ctrl-g  the command you typed if there is a problem with the current document display



5. Help command

Shell built-in command to display Help for the shell's internal commands. The help command can only display command assistance information inside the shell. The Help information for external commands can only be viewed using the man or Info command.


Grammar

Help (options) (parameters)


Options

-S: Briefly displays a summary of the usage of each shell's built-in command format.

-D: A simple description of the output command.

-M: Details how the command is used, and the output format of the information is similar to the Man command, so it is also called a pseudo-help command.

Parameters

Internal command: Specifies the shell internal command that needs to display help information.


Example 1,

#每个命令的简单描述, which means simply introducing what this command is for.

[Email protected] ~]# help-d helphelp-display information about BUILTIN commands.

#通过上面的输出我简单了解了help这个bash内置命令是用于显示shell内部命令的帮助信息的.


Example 2,

#短格式输出命令的是使用方法.

[Email protected] ~]# help-s helphelp:help [-DMS] [pattern ...]


Example 3,

#显示shell命令的详细帮助文档, the output format is similar to the Man command.

[[email protected] ~]# help -m helpname    help -  Display information about builtin commands. SYNOPSIS&NBSP;&NBSP;&NBSP;&NBSP;HELP&NBSP;[-DMS]&NBSP;[PATTERN&NBSP, ...] description    display information about builtin commands.         displays brief summaries of builtin commands.   If PATTERN is    specified, gives detailed help  On all commands matching pattern,    otherwise the list  of help topics is printed.        options:       -doutput short description for each topic       -mdisplay usage in pseudo-manpage format   & nbsp;  -soutput only a short usage synopsis for each topic  matching    pattern        arguments:       PATTERNPattern specifiying a help topic         exit status:    returns success unless pattern  is not found or an invalid option is given. See also    bash (1) implementation    gnu bash, version  4.2.46 (1)-release  (X86_64-REDHAT-LINUX-GNU)     Copyright  (C)  2011  Free Software Foundation, Inc.    License GPLv3+: GNU  Gpl version 3 or later 






This article is from the "Cowboy" blog, make sure to keep this source http://fangniuwa.blog.51cto.com/10209030/1751098

Summary of common help man,whatis,info,help under Linux systems

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.