which、whereis、man、whatis、--help、apropos

which /usr/bin/which

搜索命令所在目录及别名信息


which ls
alias ls='ls --color=auto'
/usr/bin/ls

which rm
alias rm='rm -i'
/usr/bin/rm


whereis 搜索命令及配置文件的信息

whereis rm

结果:rm: /usr/bin/rm /usr/share/man/man1p/rm.1p.gz /usr/share/man/man1/rm.1.gz

其中/usr/share/man/man1/rm.1.gz是帮助文档所在位置


man /usr/bin/man

man [命令或配置文件]  // 获取帮助信息

man passwd  whereis passwd

有一个命令叫password,还有一个配置文件也叫passwd;man 5、man 1,1表示命令的帮助,5表示配置文件的帮助
man 5 passwd


whatis ls

whatis ifconfig


ls --help


apropos services

apropos profile

原文地址:https://www.cnblogs.com/Mike_Chang/p/9499503.html