Ubuntu man manual is complete

Source: Internet
Author: User
Linux provides a wide range of help manuals. When you need to view the parameters of a command, you don't have to go online everywhere. You just need a man.
The Linux man manual consists of the following chapters:
1. Standard Commands (standard command)
2. System CILS (system call)
3. library functions)
4. Special devices (device description)
5. file formats (File Format)
6. games and toys (games and entertainment)
7. Miscellaneous (Miscellaneous)
8. administrative commands (Administrator command)
For example, we enter man
Ls, which will display "ls (1)" in the upper left corner. Here, "ls" indicates the name of the manual, and "(1)" indicates that the Manual is located in the first chapter. Similarly, we enter "man
Ifconfig "will display" ifconfig (8) "in the upper left corner )". You can also run the following command: "Man
[Chapter number] manual name ".
Man searches by chapter number, for example:
Man sleep
Only the manual of the sleep command is displayed. To view the library function sleep, enter:
MAN 3 sleep
By default, UBUNTU does not have the library function man manual for C language installation.
1. Add library function manual
By default, UBUNTU does not have the man manual for installing C language library functions.
And sendto functions will show no relevant documentation problems, this problem makes me depressed for a long time. Solution:
Sudo apt-Get install manpages-Dev
2. Show man Chinese Characters
The Ubuntu source already contains a Chinese man package, so you don't need to go down from other places.
Sudo apt-Get install manpages-ZH
However, man does not display Chinese characters by default. The following two steps are required:
A. Convert the Chinese man package to utf8 format
Create a script file
Gedit T. Sh
Add the following content
#! /Bin/bashcd
/Usr/share/man/zh_cn/
For k in * docd $ kfor I in *. gzdo J = 'echo processing completed iworkflow .gz }'
Gunzip $ I iconv-F gb18030-T utf8 $ j> TMP MV TMP $ J gzip $ jdonmcm
.. Done
Then
Sudo./t
B. Modify man's default language
Sudo gedit/etc/manpath. config change all/usr/share/man in it
/Usr/share/man/zh_cn
Save and exit. Then try man ls again.
3. Display English without help from Chinese Characters
Do
It's not enough to finish the second part. Then you try again
Some C-language functions (do not use some famous functions such as printf and socket, which have already been used in Chinese) will find no help, but the first step is already
Installed. This is because you changed/usr/share/man
The/usr/share/man/zh_cn operation enables man to search only for help in Chinese. If not, he will give up directly. Therefore, the following operations are required to enable man to do not have help in Chinese.
The help in English is displayed automatically. If there is no help in English, there will be no help.
Sudo gedit/etc/manpath. config
Then, search for the change you just made and add the same line to the end of the change, but the following directory still uses the original/usr/share/man, for example, the modified
Manpath_map/bin/usr/share/man/zh_cn
Add another row
Manpath_map/bin/usr/share/man

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.