Linux command Help

Source: Internet
Author: User

Linux command format:
command [options] [arguments]
Command: Commands
Options: Parameters

[] the expression is optional;
<> the expression is changeable;
X|y|z that only one can be selected;
-ABC represents a mixed use of three parameters (or any two)

1.whereis

?
1 2 [[email protected]]# whereis ncnc: /usr/bin/nc /usr/share/man/man1/nc.1.gz

2.whatis

?
1 2 3 [[email protected]]# whatis nc nc                   (1)  - arbitrary TCP and UDP connections and listens nc                  (rpm) - Reads and writes data across network connections usingTCP or UDP.

3.--help

?
1 2 3) 4 5 [[email protected]]# nc --hellp nc: invalid option -- - usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]           [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]          [-x proxy_address[:port]] [hostname] [port[s]]

4.man: Manis the abbreviation for manual to see the various reference manuals that are available in the system, but the manual page is divided into several sections, as follows:  

?
1 2 3 4 5 6 7 8 9 Ten page ( 1 executable programs or shell commands (User command Help)   2 system calls (System call Help   3 Library calls (library function call help)   4 Special files (usually found in /dev)   5 file formats and conventions EG/ETC/PASSWD (Profile Help)   6 games   7 miscellaneous (including macro packages and conventions ), e.g. man (7), Groff (7)   8 System administration commands (usually-only ) Code class= "CSharp keyword" >for root)   9 Kernel routines [Non standard]
?
1 2 3 4 5 6 7 8 解释一下, 1是普通的命令 2是系统调用,如open,write之类的(通过这个,至少可以很方便的查到调用这个函数,需要加什么头文件) 3是库函数,如printf,fread4是特殊文件,也就是/dev下的各种设备文件 5是指文件的格式,比如passwd, 就会说明这个文件中各个字段的含义 6是给游戏留的,由各个游戏自己定义 7是附件还有一些变量,比如向environ这种全局变量在这里就有说明8是系统管理用的命令,这些命令只能由root使用,如ifconfig

Enter the man+ number + command/function in the shell to find the relevant commands and functions. Without numbers, the Linux Man command looks for the relevant commands and functions by default from the smaller number of manuals.

For example, try to look at different results:

Man 1 Open

Man 2 Open

Man 3 Open

B. The online Help for all commands has the same basic format, from line 1th you can tell which command is helping and which section the help is in.

The name section contains the name of the command and a brief description of the command.

The summary (SYNOPSYS) section gives a description of the command, including a list of command formats, parameters, and options. On-line help the brackets indicate that this option is not a required part.

The description (DESCRIPTION) section is a detailed elaboration of the command function, which is an authoritative explanation of the command.

The options section gives instructions for each option in the command line.

The See ALSO section contains additional topics related to this command. There are some help and bug sections.

?
1 2 3 4 5 6 [[email protected]]# man -k ifconfig   <span>使用带有-k选项的man命令可以根据关键字搜索联机帮助</span> ifconfig             (8)  - configure a network interface [[email protected]]# man -k netstat gnome-netstatus     (rpm) - Network status applet netstat              (8)  - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships snmpnetstat          (1)  - display networking status and configuration information from a network entity via SNMP
?
1 2 3 4 [[email protected]]# man -f ifconfig  <span>使用带有-f选项的man命令可以根据关键字在联机帮助中搜索完全匹配的条目</span> ifconfig             (8)  - configure a network interface [[email protected]]# man -f netstat netstat              (8)  - Print network connections, routing tables, interfacestatistics, masquerade connections, and multicast memberships
?
1 2 3 4 5 6 7 8 9 10 11 g. man中常用的按键: 按鍵  进行工作 空白鍵 向下翻一頁 [Page Down] 向下翻一頁,↓为向下一行 [Page Up]   向上翻一頁,↑为向上一行 [Home]  去到第一頁 [End]   去到最後一頁 /string 向『下』搜寻 string 這个字串,如果要搜寻vbird 的話,就输入 /vbird ?string 向『上』搜寻 string 這个字串 n, N    利用 / 或 ? 來搜寻字串时,可以用 n 來继续下一個搜寻 (不论是 / 或 ?) ,可以利用 N 來进行『反向』搜寻。举例來说,我以 /vbird 搜寻 vbird 字串, 那么可以 n 继续往下查询,用 N 往上查询。若以 ?vbird 向上查询 vbird 字串, 那我可以用 n 继续『向上』查询,用 N 反向查询。 q   结束这次的 man page

D. Use with command info 、--help;

E. To bookmarks: In man, if the current bookmark, press the M key, and then the letter A, then produced a bookmark labeled A, browse to any page, want to go back to the bookmark page labeled A, press the ' key (quotation mark and single quote key) will go back to the mark of A;

F. Man run command, use! , and then typed the command, such as! Date, press ENTER to return;

<FROM:http://blog.csdn.net/dijkstar/article/details/6882325>

  

  

  

  

  

Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.