首先先下载中文版的man手册包
下载地址:中文man手册
或者使用wget命令导入到Linux里面
[root@localhost ~]# wget https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN/manpages-zh-1.5.2.tar.bz2/cab232c7bb49b214c2f7ee44f7f35900/manpages-zh-1.5.2.tar.bz2
//需要先安装wget
下载好后确认一下
编译安装
[root@localhost ~]# tar jxf manpages-zh-1.5.2.tar.bz2
[root@localhost ~]# cd manpages-zh-1.5.2/
[root@localhost manpages-zh-1.5.2]# ./configure --disable-zhtw
//默认安装--disable-zhtw
[root@localhost manpages-zh-1.5.2]# make && make install //编译安装
编辑.bash_profile文件
[root@localhost ~]# cd manpages-zh-1.5.2/
[root@localhost manpages-zh-1.5.2]# cd
[root@localhost ~]# vim .bash_profile
//任意位置插入下面内容
alias cman='man -M /usr/local/share/man/zh_CN'
[root@localhost ~]# source .bash_profile //刷新bash_profile文件生效
测试
[root@localhost ~]# man ls //默认的不变还是英文的
[root@localhost ~]# cman ls //中文的