Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

Linux 的 man 手冊怎麼看:section 分類與查詢技巧

1. 先補上手冊

Debian/Ubuntu 系列若 man 內容不完整,先裝 glibc 相關手冊:

apt-get install manpages-dev
apt-get install manpages-posix-dev

2. man page 的 section 分類

1 User commands(使用者指令)
2 Programming interfaces for kernel system calls(核心系統呼叫)
3 Programming interfaces to the C library(C 函式庫)
4 Special files such as device nodes and drivers(特殊檔案、裝置)
5 File formats(檔案格式)
6 Games and amusements(遊戲)
7 Miscellaneous(其他)
8 System administration commands(系統管理指令)

3. 用 whatis 快速定位

whatis <cmd> 會列出該指令屬於哪個 section:

# whatis ls
ls (1) - list directory contents

4. 指定 section 查閱

同一個名稱在不同 section 可能是完全不同的東西,這時必須指明:

man 3 printf 看 C 語言的 printf 函式
man 1 printf 看 shell 的 printf 指令

在 man 頁面內可以按 / 搜尋字串、n 跳到下一個符合處、q 離開。

Copyright © Linux教程網 All Rights Reserved