Linux man Command

Linux 命令大全Linux Command Reference

The Linux man command is an abbreviation of the word "manual", used to view manual pages for various commands, functions, and configuration files.

Through the man command, you can obtain detailed information about a specific command or topic.

Syntax

man [选项] [节号] 命令/主题

Some common options include:

  • -f: Displays the manual page related to the specified keyword.
  • -k: Searches for entries in manual pages that match the keyword.
  • -a: Displays all matching manual pages.
  • -w: Only displays the location of the manual page, not its content.

Common section numbers include:

  • 1: User commands
  • 2: System calls
  • 3: C library functions
  • 4: Devices and special files
  • 5: File formats and conventions
  • 6: Games and demos
  • 7: Miscellaneous
  • 8: System administration commands

Examples

To view the manual page for the ls command, execute the following command:

man ls

To view the manual page for the C standard library function printf, execute:

man 3 printf

To search for manual page entries containing a specific keyword, you can use the-koption:

man -k keyword

Linux 命令大全Linux Command Reference

Other Extensions