1、 --help
內部命令(內建命令):是shell自帶的
查看系統中有哪些內部命令:# help
# help | wc -l //統計一共有多少個內部命令
# help cd
外部命令:一般是用戶安裝軟件之後才出現的 如:tree yum
外部命令的幫助:
# ls --help
2、info 能夠查看命令的來源、選項、功能等
# info ls
# info mkdir
3、whatis 查看命令的用途
# whatis ls
ls (1) - list directory contents
ls (1p) - list directory contents
# whatis ls
ls: nothing appropriate //沒有whatis數據庫
解決:生成whatis數據庫
# makewhatis
數據庫文件:/var/cache/man/whatis
4、man 手冊
1)man 命令
# man ls
NAME
SYNOPSIS
DESCRIPTION
選項 -a -d -l
man手冊裡支持搜索功能的
/關鍵字 —— 所謂關鍵字,就是你想要查找的東西
例如:/time
/-d
在搜索模式下:按n,繼續向下查找
按N:向上查找
退出man幫助:q
2)man的級別
# man man man手冊分為八個部分,常用的是1和5,需要了解1,5,8
1 User Commands 用戶命令
2 System Calls 系統調用
3 C Library Functions C語言的庫函數
4 Devices and Special Files 設備和特殊文件
5 File Formats and Conventions 文件格式和約定
# man 5 passwd //查看的是/etc/passwd文件的幫助
6 Games et. Al. 遊戲和娛樂
7 Miscellanea
8 System Administration tools and Deamons
系統管理工具和守護進程幫助
# man ls
# man 5 文件名
# man 8 httpd //httpd是apache的web服務的守護進程名
閱讀更多 飛哥有料 的文章