Linux under man help command use full resolution

Source: Internet
Author: User
Tags fam

1.Linux provides a wealth of help manuals, and when you need to see the parameters of a command, you don't have to go around surfing the internet, just man.

All the man pages belong to a specific field, represented by a single character.

Linux is the most common area and its name and description as follows:

Description of Domain name

1 user commands, which can be initiated by anyone.

2 system call, the function provided by the kernel.

3 routines, that is, the library function.

4 device, that is, the special file in the/dev directory.

5 file format description, such as/etc/passwd.

6 games, no need to explain!

7 Miscellaneous, such as macro command packs, conventions, and so on.

8 system Administrator tool, can only be started by root.

9 Other (Linux specific) documents used to store kernel routines.

N new documents, you may want to move to a more appropriate area.

o old documents may be retained for a period of time.

L A local document related to this particular system.
Some common parameters and usage of 2.man

The code is as follows:

Man-a cmd

Open all fields of the same name help, such as man fam, you will first enter a fam (1M) command version of FAM Help, you press Q key

Will go into fam (3X), library function version of the Help

The code is as follows:

Man-aw cmd

Shows the path to all the manual files for all cmd, such as Man-aw Fam is

The code is as follows:

/usr/share/man/man1/fam.1m.gz

/usr/share/man/man3/fam.3x.gz
Man Domain code cmd

Directly specify the search manual pages in specific areas, such as the help of Man 3 fam directly into the library function version

The code is as follows:
Man-m cmd

Specify the search path for the manual file, such as Man-m/home/mysql/man MySQL displays the help of MySQL you installed.

Instead of the system's own legacy MySQL Help

The code is as follows:
Mans cmd| Col-b > Cmd.txt

Output man manual information to a text file

Lang= Language Code

The code is as follows:
Man-w cmd
Path for man-specific language manpage files

View a specific language version of the man page

For example, to see MPlayer's Chinese man

The code is as follows:
Shell> Lang=zh
Shell> man-w MPlayer
/usr/share/man/zh/man1/mplayer.1.gz

Open a new Shell window (or shell> lang=en_us in the original window). UTF-8)

The code is as follows:
Shell> man/usr/share/man/zh/man1/mplayer.1.gz

3.ubuntu default is not installed in the C language library function man manual

(1). Add Library function Manual
Ubuntu default is not installed in the C language library function man manual, so you in the man perror and sendto such functions will show no related documents, the problem that I am depressed for a long time. Workaround:

The code is as follows:
sudo apt-get install Manpages-dev

(2). Let man display Chinese
The Ubuntu source already contains the Chinese man package, so you don't have to go down from anywhere else, directly

The code is as follows:
sudo apt-get install Manpages-zh

But this man's default display is not Chinese, there are two steps to follow
A. Converting the Chinese man package to UTF8 format
Create a new script file

The code is as follows:
Gedit t.sh

Add the following content

The code is as follows:
#!/bin/bashcd/usr/share/man/zh_cn/for K-*docd $kfor i in *.gzdo j= ' echo ${i%.gz} ' gunzip $i iconv-f gb18030-t UTF8 $J >tmp MV tmp $j gzip $JDONECD. Done

And then

The code is as follows:
sudo./t

B. Modifying the man's default language

The code is as follows:
sudo gedit/etc/manpath.config

Change all the/usr/share/man inside to/USR/SHARE/MAN/ZH_CN.
Save and then quit, and then you try man ls
(3). Show English without help from Chinese
Finish the second part of the above is not enough, then you man again some C language functions (do not use printf,socket, such as more well-known functions, these already have Chinese help) will find that there is no help, and just clearly in the first step has been installed AH. This is because you change the/usr/share/man to the/usr/share/man/zh_cn of the operation so that man only in Chinese help search, if not to give up directly, so also need the following operations, in order to let man without Chinese help automatically show English help, If there is no English, there really is no.

The code is as follows:
sudo gedit/etc/manpath.config

Then search for the place you just changed, and then add the same line behind it, just the following directory with the original/usr/share/man, such as the modified

The code is as follows:
Manpath_map/bin/usr/share/man/zh_cn

Add another row

The code is as follows:
Manpath_map/bin/usr/share/man

If you find that there are many manual pages missing from the installed system.
It's done with the following command.

The code is as follows:
sudo apt-get install manpages
sudo apt-get install Manpages-de
sudo apt-get install Manpages-de-dev
sudo apt-get install Manpages-dev

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.