Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use man Chinese help manual for Linux system

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to install and use man Chinese help manual for Linux system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

How nice it would be to have a Chinese help manual when I just learned linux. Although the help that comes with linux is available in many languages, there are basically no Chinese help manuals in various distributions of linux. It makes a lot of sense to create a handbook that suits you. In fact, the configuration process is relatively simple, just need to know the Chinese package, and then put it into the directory that man can search, basically on it.

Here are a few steps:

Download the open source man-pages Chinese manual package configuration decompression manual package test installation Chinese package 1, install Chinese help manual in personal working directory

This advantage is that each user who logs in can have their own language version of the help manual. People's direct manuals will not be called to each other, independent and flexible.

1. Download the open source man Chinese manual package (man-pages man page)

You are now ready to download the open source help manual package:

1. Open http://code.google.com/p/manpages-zh/ and click: manpages-zh-1.5.tar.gz below

2. Download the development package through linux wget

The code is as follows:

[chengmo@centos5 ~] $wget http://manpages-zh.googlecode.com/files/manpages-zh-1.5.tar.gz

Just enter it.

2. Decompress the man Chinese manual package

As long as you set up the man/zh_CN directory under your working directory, unzip the package and follow the specification directory. It can be searched by the man command.

Under special instructions, the following installation ensures that your language environment is set to Chinese:

The code is as follows:

[chengmo@centos5 ~] $echo $LANG

Zh_CN.GB2312

If not: through export LANG=zh_CN.GB2312

If you find that the above execution fails, you can run: locale-a to check the character sets supported by your system

The code is as follows:

[chengmo@centos5] $cd ~

# enter the current directory

[chengmo@centos5] $mkdir-p man/zh_CN

# create a directory man and a subdirectory zh_CN

[chengmo@centos5 ~] $tree man

Man

`--zh_CN

# directory and subdirectories are ready, now you just need to unzip the package to the zh_CN Chinese directory.

[chengmo@centos5 ~] $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

#. Decompress the packet

[chengmo@centos5 ~] $cd manpages-zh-1.5

[chengmo@centos5 manpages-zh-1.5] $ls

COPYING debian DOCS Makefile man-pages-zh_CN.spec raw README README.GB src utils

# this directory structure supports make installation. You can generate compilation files through the make command, or you can directly copy the src directory inside the installation.

[chengmo@centos5 manpages-zh-1.5] $make

Mkdir UTF-8

Cp-r src/man* UTF-8/

# has been generated: files under the UTF-8 directory, just copy the directory to ~ / man/zh_CN

[chengmo@centos5 manpages-zh-1.5] $cp-r UTF-8/* ~ / man/zh_CN/

Through the above steps, you have installed the help manual under man/zh_CN under your working directory.

3. Test whether the man Chinese help manual is installed successfully.

Next check to see if the man Chinese manual has been added to the man path.

The code is as follows:

[chengmo@centos5 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

# found that: / home/chengmo/man and: / home/chengmo/man/zh_CN have been added to the MANPATH path

[chengmo@centos5 ~] $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

# found that the Chinese manual has been found

[chengmo@centos5 ~] $man 5-aw passwd

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

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

# read domain 5 with limited types, so that the original English of the system is retained, and it is convenient to read both English and Chinese.

[chengmo@centos5] $man 5-a passwd

# if English is displayed, press Q and the Chinese document will come out

Second, all users share a Chinese help manual

The principle here is basically the same as that of individual users, except that the manual is put in everyone's public directory, not the personal directory.

The code is as follows:

[chengmo@centos5 ~] $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

By default, the public man page address of the system is generally under / usr/share/man, which can be placed in the zh_CN directory below.

The code is as follows:

[chengmo@centos5 manpages-zh-1.5] $make

Mkdir UTF-8

Cp-r src/man* UTF-8/

# has been generated: files under the UTF-8 directory, just copy the directory to ~ / man/zh_CN

[chengmo@centos5 manpages-zh-1.5] $cp-r UTF-8/* / usr/share/man/zh_CN/

Other man.config configurations do not need to be modified. Check it out:

The code is as follows:

[chengmo@centos5 ~] $man 5-aw passwd

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

/ user/share/man/zh_CN/man5/passwd.5

The instruction manual has been installed.

Here are two ways to install the introduction, feel the Chinese manual is very good, you can try, I personally prefer to install to the working directory is better, because now there are many versions of linux, and there are many commands seem to be the same, but actually there are some differences, this Chinese manual update is not as fast as the corresponding software update. When you find that the command is inconsistent when you use it, you still have to pay attention to the original English. It is also a good idea to keep both Chinese and English manuals.

This is the end of the Chinese help manual on how to install and use Linux in man. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report