Linux Build man Chinese help manual diagram

Source: Internet
Author: User

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:

    1. Download the Open source man-pages Chinese Brochure Package
    2. Configure Unpacking Manual Package
    3. 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] ~]$ cdmanpages-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

mkdirUTF-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] ~]$ man5 -aw passwd

/usr/share/man/man5/passwd.5.gz

/home/chengmo/man/zh_CN/man5/passwd.5

#读取领域5限定类型,这样系统原先的英文也保留了,看中英文也很方便

[[email protected] ~]$ man5 -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

mkdirUTF-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] ~]$ man5 -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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.