In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to create man Chinese in linux". In daily operation, I believe many people have doubts about how to create man Chinese in linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to create man Chinese in linux". Next, please follow the editor to study!
First, install the Chinese help manual in the 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
[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:
[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.
The code is as follows:
Check it out:
[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.
At this point, the study of "how linux creates man Chinese" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.