幫助命令
man 英語 manual 查看非shell命令,包含解釋,十分詳細(xì)
- man 命令 或配置文件
man man 的結(jié)果,截取部分
1 Executable programs or shell commands //可執(zhí)行程序或shell命令
2 System calls (functions provided by the kernel) //查看可被內(nèi)核調(diào)用的幫助
3 Library calls (functions within program libraries)//查看函數(shù) 函數(shù)庫幫助
4 Special files (usually found in /dev)//查看特殊文件幫助
5 File formats and conventions eg /etc/passwd //查看配置文件的幫助
6 Games// 查看游戲幫助
7 Miscellaneous (including macro packages and conventions), e.g.
man(7), groff(7)//其他選項(xiàng)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
man 1 命令 查看指定的命令幫助
man 8 ifconfig
[root@bogon ~]# whatis ls
ls (1) - list directory contents
man -f ls 查看命令有幾種幫助文檔
相當(dāng)于 whatis
help 命令
help查看命令選項(xiàng)
ls --help 查看ls的命令選項(xiàng) 相當(dāng)于man ls ,簡要顯示
help 查看shell內(nèi)核命令幫助
help cd
如何判斷是否為shell 內(nèi)核命令 type
[root@localhost conf.d]# type cd
cd is a shell builtin//cd 是一個(gè)shell內(nèi)置命令
[root@localhost conf.d]# type man
man is hashed (/bin/man)//非內(nèi)置
[root@localhost conf.d]# type systemctl
systemctl is hashed (/bin/systemctl)
whereis
查看幫助文件等級(jí)
查看命令的配置文件
[root@bogon etc]# whereis passwd
passwd: /usr/bin/passwd /etc/passwd /usr/share/man/man1/passwd.1.gz
apropos 配置文件 獲取配置文件的簡短信息
apropos ls 查看命令中含有l(wèi)s
info 命令 和man差不多
info是將所有命令的幫助信息放在一起