It's a good thing to have a Chinese help handbook just to learn Linux. Linux comes with help although there are multiple languages, there is currently no Chinese help manual for various distributions of Linux. It makes sense to build a Chinese manual that suits you. The configuration process is actually relatively simple, just need to know the Chinese package, and then put in the man can search for the directory, basic can be.
Here are a few steps to be divided:
- Download the Open source man-pages Chinese Brochure Package
- Configure Unpacking Manual Package
- Test Install Chinese Package
First, in the personal working directory to install the Chinese help manual
The advantage is that each user, landing in can have their own language version of the Help manual. The direct manuals are not called, they are independent and flexible.
1. Upload Manual Package
Click to download the brochure package
2. Extract the man Chinese booklet pack
Just set up the MAN/ZH_CN directory below your working directory, unzip the package, and follow the specifications in the directory. The man command can be searched.
Specifically, the following installation ensures that your locale is set to Chinese:
[Email protected] ~]$ echo $LANG
Zh_cn. GB2312
If not: through export LANG=ZH_CN. GB2312
If you find that the above execution does not pass, you can run: locale-a check your system's supported character sets
[[email protected] ~]$
cd
~
#进入当前目录
[[email protected] ~]$
mkdir
-p
man
/zh_CN
#建立目录man 以及子目录zh_CN
[[email protected] ~]$ tree
man
man
`-- zh_CN
#目录以及子目录已经可以了,现在只需要将压缩包解压到zh_CN 中文目录即可
[[email protected] ~]$
tar
-xzvf manpages-zh-1.5.
tar
.gz
manpages-zh-1.5
/src/mann/expr
.n
manpages-zh-1.5
/src/mann/fblocked
.n
manpages-zh-1.5
/src/mann/fconfigure
.n
manpages-zh-1.5
/src/mann/fcopy
.n
manpages-zh-1.5
/src/mann/file
.n
manpages-zh-1.5
/src/mann/fileevent
.n
manpages-zh-1.5
/src/mann/filename
.n
manpages-zh-1.5
/src/mann/flush
.n
manpages-zh-1.5
/src/mann/focusNext
.n
manpages-zh-1.5
/src/mann/for
.n
manpages-zh-1.5
/src/mann/foreach
.n
#......解压数据包
[[email protected] ~]$
cd
manpages-zh-1.5
[[email protected] manpages-zh-1.5]$
ls
COPYING debian DOCS Makefile
man
-pages-zh_CN.spec raw README README.GB src utils
#该目录结构 支持make安装的,可以通过make命令生成编译文件,也可以直接复制里面src目录安装
[[email protected] manpages-zh-1.5]$
make
mkdir
UTF-8
cp
-r src
/man
* UTF-8/
#已经生成了:UTF-8目录下面文件,只需要将该目录复制到~/man/zh_CN下面即可
[[email protected] manpages-zh-1.5]$
cp
-r UTF-8/* ~
/man/zh_CN/
通过上面几步已经将帮助手册安装到自己的工作目录下面的
man
/zh_CN
下面了。
3, Test man Chinese help manual is installed successfully
下面检查下,看
man
中文手册是否加入到
man
路径里面了。
[[email protected] manpages-zh-1.5]$
man
-w
/usr/kerberos/man
:
/usr/local/share/man
:
/usr/share/man/zh_CN
:
/usr/share/man
:
/home/chengmo/man/zh_CN
:
/home/chengmo/man
:
/usr/local/man
#发现已经在MANPATH路径加入了:/home/chengmo/man 以及:/home/chengmo/man/zh_CN
[[email protected] ~]$
man
-aw
passwd
/usr/share/man/man1/passwd
.1.gz
/usr/share/man/man5/passwd
.5.gz
/home/chengmo/man/zh_CN/man5/passwd
.5
#发现已经找到中文手册了
[[email protected] ~]$
man
5 -aw
passwd
/usr/share/man/man5/passwd
.5.gz
/home/chengmo/man/zh_CN/man5/passwd
.5
#读取领域5限定类型,这样系统原先的英文也保留了,看中英文也很方便
[[email protected] ~]$
man
5 -a
passwd
#显示英文的,按q就会出来中文文档了
Second, all users common Chinese help manual
Here the principle is basically the same as the individual user, but the manual is placed in the common directory, not the personal directory.
[[email protected] ~]$ tree
/usr/share/man/zh_CN
/usr/share/man/zh_CN
|-- man1
| `-- newgrp.1.gz
`-- man8
|-- adduser.8.gz
|-- chpasswd.8.gz
|-- groupadd.8.gz
|-- groupdel.8.gz
|-- groupmod.8.gz
|--
useradd
.8.gz
|-- userdel.8.gz
`--
usermod
.8.gz
The System default public manual page address is generally in:/usr/share/man below, puts in below the ZH_CN directory to be able.
[[email protected] manpages-zh-1.5]$
make
mkdir
UTF-8
cp
-r src
/man
* UTF-8/
#已经生成了:UTF-8目录下面文件,只需要将该目录复制到~/man/zh_CN下面即可
[[email protected] manpages-zh-1.5]$
cp
-r UTF-8/*
/usr/share/man/zh_CN/
1
2
其它的
man
.config配置不需要修改。
检查一下:<
/strong
>
[[email protected] ~]$
man
5 -aw
passwd
/usr/share/man/man5/passwd
.5.gz
/user/share/man/zh_CN/man5/passwd
.5
说明手册已经安装好了。
Here are 2 ways to install the introduction, feel the Chinese manual is very good, you can try, I personally prefer or install to the working directory is better, because now a lot of Linux, and command a lot of seemingly the same, but there are some differences, this Chinese manual update does not have the corresponding software update fast. When the use of the time to find that the command is inconsistent, still have to elegant original English. It's also a good idea to keep both the English and Chinese manuals there.
Linux Build man Chinese help manual diagram