Access to command help in Linux

Source: Internet
Author: User

For the novice who just started to learn Linux, need to remember a lot of commands and the parameters of the command options, such as 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0070.gif "alt=" J _0070.gif "/>. And these teachers in the classroom can not be exhaustive, so can independently find the interpretation of the command and use of the method is particularly important, also this side reflects a Linux learner can go farther 650) this.width=650; "src=" http// Img.baidu.com/hi/jx2/j_0069.gif "alt=" J_0069.gif "/>. So to learn Linux first let's take a look at Common Linux command Help to get the way it. 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0006.gif "alt=" J_0006.gif "/>

  1. Internal command Help

    Help COMMAND


    The system default shell provides help for bash and wants to find help information for bash we can use the Man Bash command to view it. At the same time we know that there are many internal commands available in bash (use type command to see if internal commands). such as: CD, LS, hash, and so on, if we use the Man CD to view the Help information will be what? What you actually see is Bash's help message, a big piece of information that we don't want to see. So we want to quickly navigate to internal commands and we do this with the help command.

    Example: Help CD

    650) this.width=650; "Src=" Http://upload-images.jianshu.io/upload_images/6843202-a888b5852144b994.png?imageMogr2 /auto-orient/strip%7cimageview2/2/w/1240 "style=" Height:auto;vertical-align:middle;border:0px;color:rgb ( 47,47,47); font-family: '-apple-system ', ' SF UI Text ', Arial, ' Pingfang SC ', ' Hiragino Sans GB ', ' Microsoft yahei ', ' Wenquan Yi Micro Hei ', Sans-serif;text-align:center;white-space:normal;background-color:rgb (252,250,242); "alt=" 1240 "/>
    Looks like this is not very refreshing 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0058.gif "alt=" J_0058.gif "/>

  2. External command Help

    ①command--help

    Almost all Linux commands are developed so that developers will be able to use instruction syntax and parameters to write instructions during the operation! You can use the "--help" option to make a general understanding of the use of instructions. For example, let's look at date. The basic usage and option parameters of this directive are described:

    650) this.width=650; "Src=" Http://upload-images.jianshu.io/upload_images/6843202-8d4dbe8b36b65329.png?imageMogr2 /auto-orient/strip%7cimageview2/2/w/1240 "style=" Height:auto;vertical-align:middle;border:0px;color:rgb ( 47,47,47); font-family: '-apple-system ', ' SF UI Text ', Arial, ' Pingfang SC ', ' Hiragino Sans GB ', ' Microsoft yahei ', ' Wenquan Yi Micro Hei ', Sans-serif;text-align:center;white-space:normal;background-color:rgb (252,250,242); "alt=" 1240 "/>

    Look at the above display, the first is the way to release the syntax (Usage), this date has two basic syntax, a direct release and retrieve the date of the rotation value, and can be +forment way to appear. Another way is to add MMDD

HHMMCCYY (the month, day and day are divided into years) to set the time. You will then see the main options for the command and describe the meaning of each option, followed by the use of the important format. We can see this command quite handy! In addition--help has a twin brother-H, their usage is the same. Just a personal or more recommended use of--help, one is because the command to support the use of--help is more than-H, and the second is-H may be as you want to query the command parameters! For example, a classmate of elation with just learn-H to inquire shutdown help, the results ... Oh, you know 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0072.gif "alt=" J_0072.gif "/>".

But usually--help is used to assist you in querying the commands you have used to have the options and parameters, if you want to use the instructions you have never used, or you want to query is not an instruction but the format of the file, it will be through the man to query.

②man COMMAND

Man is a shorthand for manual (operating instructions), and you can see the most detailed instructions with the Man command. First, let's look at the operation and interpretation in the man manual:

The meaning of the man manual paragraph:

    • Name: Names and brief description of the command

    • DESCRIPTION: A detailed description of the command function

    • Option: Description of the supported options

    • Sysnopsis: Using formats

    • EXAMPLES: Usage conventions

    • NOTES: Related Considerations

    • Files: Related configuration files

    • See ALSO: Related references

Use the man command to get the meaning of the symbol in the Help information page of the command:

[]: Optional content

<>: Required Content

| : Two Choose one

...: homogeneous content can have multiple methods

Operation of the man command:

Flip screen: Use a space or up and down arrows, or pgup, PGDN, etc.

Text Search:/keyword forward search? Keyword reverse search n the same search direction search for the next keyword N search in the opposite direction of the keyword

The section that the query command belongs to

Whatis command or MAN-K command

Chapter Content Description
1 User Commands section, so users can use the
2 System Invoke Command Chapter
3 C Library Call
4 Equipment and special documents
5 Configuration file format and related parameters
6 Game
7 Miscellaneous
8 Administrative commands available to system administrators
9 Documents related to Kernel

The 1, 5, and 8 chapters in the table above are very important and need to be written down by our small partners.

The Man handbook is very large and reliable, but at the same time I am dazzled by the plethora of chapters. Here you need another reliable little brother Whatis to debut.

③whatis COMMAND

Using the Whatis command, you can concisely display the approximate description and purpose, and also give the chapter of the command in the Man manual. Then we use the Man "chapter" command to pinpoint the information we need. Just this command is not immediately available to the user who just installed the operating system because it does not have a database, and a database update is used nightly. Do you have to wait one night with such a small command? Of course not! Users can use Makewhatis or mandb to create a database, and man-f command equals Whatis command.

Say so much did you learn to quickly query yourself for confusing commands to use?


This article is from the Linux OPS blog, so be sure to keep this source http://arm2012.blog.51cto.com/2418467/1947901

Access to command help in Linux

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.