How to use the Linux Man command

Source: Internet
Author: User

Linux provides a rich help manual that you do not have to look for when you need to see the parameters of a command, as long as you have a man.

You can use man man to see how man is used


There are several chapters in 1.man:

Code
Function
1 Standard user commands (executable programs or shell commands)
2 System calls (systems calls)functions provided by the kernel
3 Library callfunctions within program libraries
4 Access entry for special files (device files) (/dev)special files (usually found In/dev)
5 File format (configuration file syntax), specifying the program's Run properties file formats and conventions
6 Game (games)
7 Miscellaneous (Miscellaneous)including macro packages and conventions
8
Management Command System Administration Commands
9 Files related to Kernel Kernel routines

Format of the 2.man Handbook

Name and function brief description of the command

Synopsis usage notes, including available options

A detailed description of the DESCRIPTION command function, which may include the meaning of each option

OPTIONS Explain the meaning of each item

Files This command is related to the configuration file

BUGS

EXAMPLES Use Example

See ALSO additional references


How to use the 3.man manual

Flip Screen

Turn back one screen: space (space bar) to turn one screen: b

Turn back one line: Enter (enter key) and turn one line forward: K

Find:

/keyword looking backwards N: Next

? KEYWORD Forward lookup N: Previous

Exit: Q


4. Common examples

See Man's Help Manual in chapters:

4.1 Standard user Commands

You can use the Whatis command to query what functions a command performs and print the results of the query to the terminal.

For example:

[[Email protected] ~] #whatis CD

CD (1p)-Change the working directory

CD [Builtins] (1)-bash built-in commands, see Bash (1)

#从上文的输出结果我们看到cd命令是bash的内建命令, its function is to change the current directory, you can view its help in sections 1 and 1p.


[[Email protected] ~] #man 1 CD

Use the command above to view the CD's Help information directly.

[[Email protected] ~] #man 1p CD

Since the 1p chapter is a Help for bash, after using the "Man1p CD" , you can see the CD Help by entering "/CD" in the man to find the relevant information.


4.2 system Calls


[Email protected]]# Whatis Read

Read (1p)-read a line from standard input

Read (2)-read from a file descriptor

Read (3p)-read from a file

Read [Builtins] (1)-bash built-in commands, see Bash (1)

#从上面可看到, read has content in 1,1p,2,3p, see system calls below

[[Email protected] ~] #man 2 Read

[[Email protected] ~] #man 2 mount


4.3 Library calls

[[email protected] ~]# Man 3 sleep


4.4 Special files (device files)

[[Email protected] ~] #man 4 TTY


4.5 file Format (configuration file syntax)

[[email protected] ~]# man 5 passwd


4.8 Administrative Commands

[[email protected] ~]# Man 8 fdisk







This article from the "Network connected to the World" blog, please be sure to keep this source http://3157957.blog.51cto.com/3147957/1912113

How to use the Linux Man command

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.