文章目录
第一种可能是你没有安装man
只需要安装就可以
[root@centos ~]# yum install man
第二种可能是环境变量PATH不对的问题
此时,把该路径加入PATH即可,
# 用whereis命令查看,该指令的位置。
[root@centos swpu]# whereis man
man: /usr/share/man
# 通过编辑/etc/profile来改PATH
[root@centos swpu]# vim /etc/profile
进入编辑模式,在最后,添加:
export PATH="/usr/share/man:$PATH"
保存,退出,然后运行:
[root@centos swpu]# source /etc/profile
不报错则成功。
如果输入vim /etc/profile
,出现vim: command not found
错误,则参考这个网址:linux错误—1.vim: command not found来解决。