美文网首页
Linux man手册中文汉化

Linux man手册中文汉化

作者: JepWei | 来源:发表于2020-04-21 16:25 被阅读0次

源码网址 https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN/

1、获取安装包

[root@localhost opt]# 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

2、解压并安装

[root@localhost opt]# tar xf manpages-zh-1.5.1.tar.gz
[root@localhost opt]# cd manpages-zh-1.5.1/
[root@localhost manpages-zh-1.5.1]# ./configure --disable-zhtw --prefix=/usr/local/zhman
[root@localhost manpages-zh-1.5.1]# make && make install

3、 为了不覆盖man,我们新建cman命令作为中文查询

[root@localhost man1]# cd ~
[root@localhost ~]# echo "alias cman='man -M /usr/local/zhman/share/man/zh_CN' " >>.bash_profile
[root@localhost ~]# source .bash_profile

4.使用我们新建的中文cman查询命令

[root@localhost ~]# cman ls

二、默认语言修改成中文

vim /etc/locale.conf
打开这个配置文件
添加
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"

相关文章

网友评论

      本文标题:Linux man手册中文汉化

      本文链接:https://www.haomeiwen.com/subject/ipfpihtx.html