让man显示中文

安装中文帮助文件脚本

#下载解压man中文包

[root@izm5e63wlhi02su9ssspzoz ~]# wget https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN/manpages-zh-1.5.1.tar.gz/13275fd039de8788b15151c896150bc4/manpages-zh-1.5.1.tar.gz

tar zxvf manpages-zh-1.5.1.tar.gz

#安装该中文包

[root@izm5e63wlhi02su9ssspzoz ~]# cd manpages-zh-1.5.1/

[root@izm5e63wlhi02su9ssspzoz ~]# ./configure --prefix=/usr/local/zhman --disable-zhtw

[root@izm5e63wlhi02su9ssspzoz ~]# make

[root@izm5e63wlhi02su9ssspzoz ~]# make install

#使cman进入中文帮助文档

[root@izm5e63wlhi02su9ssspzoz ~]# echo "alias cman='man -M /usr/local/zhman/share/man/zh_CN'" >> /etc/profile
[root@izm5e63wlhi02su9ssspzoz ~]# . /etc/profile

通过执行以上脚本就可以通过cman来获取中文文档了 如cman ls


猜你喜欢

转载自blog.csdn.net/nailsoul/article/details/80859353