(1)whereis:搜索命令#的命令
whereis 【命令】
作用:搜索命令所在路径 及帮助文档所在位置(我在哪)
选项:
-b:只查找可执行文件(搜索命令所在路径)
-m:只查找帮助文件(帮助文档所在位置)
root@strivenoend-virtual-machine:/home/strivenoend# whereis locate
locate: /usr/bin/locate /usr/share/man/man1/locate.1.gz
扩展其他关于命令的命令
whatis 【命令】
功能:查看这个命令的作用(我是干什么的)
root@strivenoend-virtual-machine:/home/strivenoend# whatis locate
locate (1) - find files by name
whoami
功能:(我是谁):显示的是当前用户的名字
root@strivenoend-virtual-machine:/home/strivenoend# whoami
root
(2)which 搜索命令#的命令
which 【命令】
作用:搜索命令所在路径 ,如果该命令有别名会显示别名
注意!!!!!!!!用which whereis这两个命令是找不到cd命令的,因为cd命令是shell自带的命令,(shell是用户与linux系统交流的必备工具)