whoami

作用:当前你登录的用户是谁

Linux系列(9) - whoami和whatis

whatis [命令]

作用:查询[命令]是干嘛的

????我们试一下对文件和目录whatis行不行,结果发现不行;但是有没有发现对命令whatis也不行,为什么呢;

Linux系列(9) - whoami和whatis

原因:

  • whatis是根据数据库执行查找操作的

  • 数据库是定是跟新的,但新安装的系统还未自动跟新

方法:

  • root权限下

  • 使用makewhatis手动更新(OS7版本以下)

  • 使用mandb进行更新(OS7及其以上)

mandb

作用:更新数据库

Linux系列(9) - whoami和whatis

????更新结束,执行whatis [文件或目录]还不行,说明这个whatis只能看命令,

????执行whatis ls,成功执行,list directory contents????列出目录内容。ok!

Linux系列(9) - whoami和whatis

 

相关文章:

  • 2022-12-23
  • 2021-11-14
  • 2022-01-05
  • 2022-12-23
  • 2021-11-13
  • 2021-07-08
  • 2022-12-23
  • 2021-09-02
猜你喜欢
  • 2022-12-23
  • 2021-05-06
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-11-20
相关资源
相似解决方案