环境:VMWare+Red Hat Enterprise Linux 5
下载中文man包
源码的网址:https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN
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不能下载可以先用win下载再传输给Linux
yum install bzip2//这步可以不安装
tar jxvf manpages-zh-1.5.2.tar.bz2
./configure --disable-zhtw #默认安装
make && make install
cd ~
vi .bash_profile
//在.bash_profile中增加;为了不抵消man,我们新建cman命令作为中文查询:
alias cman='man -M /usr/local/share/man/zh_CN'
//更新bash_profile 使其生效:
source .bash_profile
以上操作说明两点:
1、wget在1.18之前存在https下载的bug,并不是很明确(鉴于当前版本早已到1.20,更新至最新版本即可)
2、以下是我的版本,wget加 --no-check-certificate
和 curl -O -L都不行;所以要用wget务必升级到最新版本
![e20308b98799abc026309cf05634c8bc.png](https://img-blog.csdnimg.cn/img_convert/e20308b98799abc026309cf05634c8bc.png)
.bash_profile文件:
![88506e174023d0168a572053ec66c736.png](https://img-blog.csdnimg.cn/img_convert/88506e174023d0168a572053ec66c736.png)
结果:并不是所有的命令都有中文,POSIX标准函数查询还是英文(cman dirent.h)
![a113aa687c52985376de10c9497fe60e.png](https://img-blog.csdnimg.cn/img_convert/a113aa687c52985376de10c9497fe60e.png)
参考文件Linux配置中文版man手册_运维_panco_的博客-CSDN博客