Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the man command of Linux system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Linux system man command how to understand, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

What if there are problems that won't happen in the Linux system? It was man, and when you need to check the usage and parameters of a command, you only need to man it.

02. The command format is man [- adfhktwW] [section] [- M path] [- P pager] [- S list] [- m system] [- p string] title... 03. Common option Usage: man [OPTION...] [chapter] man pages.-a,-- all finds all matching man pages-d,-debug outputs debug information-D,-- default resets all options to default values-- warnings [= warning] turns on groff warning-f,-- whatis is equivalent to whatis-h displays the syntax and parameter description of man Exit the program when the execution is complete. -k,-- apropos is equivalent to apropos will search the whatis database Fuzzy search keywords-S,-s,-- sections= list uses a list of chapters separated by half-corner colons-t,-- troff uses groff handpage typesetting-w,-- where,-- path,-- location output man page physical location-W,-- where-cat,-- location-cat output cat file physical location-c -- catman is used by catman Used to rearrange outdated cat pages-C,-- config-file= files use the user settings file-K,-- global-apropos search for text in all pages-M,-- manpath= path to set the path of the search manual page to "path"-- help give this help list-- usage give a short usage message-V -- version print program version-R,-- recode= Encoding output source page encoded in ENCODING search Man Page:-- L,-- locale= area defines the locale used for this man page search-m,-- systems= system use manual pages from other systems-e,-- extension= extension limits search to man pages with extension type "extension"-I -- ignore-case is not case-sensitive when looking for man pages (default)-I,-- match-case is case-sensitive when looking for man pages. -regex show all pages matching regex-- wildcard show all pages matching wildcard-- names-only make-- regex and-- wildcard match page names only, not descriptions

04. Related description 4.1 structure and meaning of man command help information

The structure name represents the meaning of the NAME command name and function brief description of the general use of SYNOPSIS parameters DESCRIPTION command function detailed introduction, including the meaning of each option EXAMPLES use example (with simple description) OVERVIEW overview of DEFAULTS default functions OPTIONS specific available options (with introduction) ENVIRONMENT environment variables FILES files related to HISTORY maintenance history and contact information 4.2 man chapter overview

-S section list ````The list is a list of manuals to find separated by colons. This option overrides the MANSECT environment variable. Some instructions or programs may have more than one topic, which are located in different sections. Therefore, to view the later section ````, you can specify the order in which man looks for sections. The specific section division is as follows: ````section 1: user instruction```` section 2: system call ````section 3: library call```` section 4: device ````section 5: file format```` section 6: game ````section 7: miscellaneous```` section 8: system instruction ````section 9: kernel instruction```` section n:Tcl or Tk instruction

4.3 buttons commonly used in man commands and their uses

Press the key to use the space bar to turn down one page Page down down one page Page up up one page home directly to the home page end directly to the last page / search for a keyword from top to bottom, such as "/ linux"? Search for a keyword from bottom to top, such as "? linux" n to the next keyword N to the previous keyword Q to exit help document 05. Refer to example 5.1 user commands

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

[deng@localhost ~] $whatis ``cd``cd`` (1)-GNU Bourne-Again SHell (GNU command interpreter "Bourne II") ``cd`` (3tcl)-change the working directory ``cd`` (1p)-change the working directory`` [deng@localhost ~] $from the output above, we can see that the cd command is the built-in command of bash. Its function is to change the current directory. You can see its help in sections 1 and 1p.

Check the ``bash`` command, and then use ``/ cd`` to search ``[ deng@localhost ~] $``man`1 ``cd``. You can directly view the help information of ``cd`` by using the following command. ``[deng@localhost ~] $``man``1p`` cd5.2 system call

[deng@localhost ~] $``man`2`` read5.3 library call

[deng@localhost ~] $``man`3``sleep5.4 special file (device file)

[deng@localhost ~] $``man`4 ``tty5.5 file format (syntax of configuration file)

[deng@localhost ~] $``man`5`` passwd5.6 management command

[deng@localhost ~] $``man`8``fdisk after reading the above, have you mastered how to understand the man command of the Linux system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report