On the charm of men in Linux-man

Source: Internet
Author: User

A command that provides help in a Linux system. In layman's terms it is the Manual of command.
It's a total of nine chapters.
1. User commands
2. System call
3. C Library Call
4. Equipment files and special documents
5. Configuration file format
6. Games
7. Miscellaneous
8. Management command and daemon process
9. Linux Kernel API (CentOS7 appears later)
For example, to know the chapter that a command belongs to man.
We can use the Whatis command.
Example: Whatis pwd
[Email protected] ~]# Whatis pwd
PWD (1)-Print name of current/working directory
PWD (1p)-Return working directory name
PWD (3TCL)-Returns the current working directory
This command clearly shows which chapter the command belongs to
There are a lot of commands in Linux we can't remember, we can learn by the man who ordered it.
Here's an example to illustrate
In the native character terminal login, in addition to display the original information, and then display the current login terminal number, hostname, and time. Tip: Cat/etc/issue
Complete the request with the man command
Here are the steps to proceed:
1, the hint about issue, we can start from issue, see if there is any information that can help us
Use man issue to get information
[email protected] ~]# man issue
ISSUE (5) Linux Programmer ' s Manual ISSUE (5)

NAME
Issue-prelogin Message and Identification file

DESCRIPTION
The file/etc/issue is a text file which contains a message or sys‐
TEM identification to be printed before the login prompt. It May
Contain various @char and \char sequences, if supported by the
Getty-type program employed on the system.

FILES
/etc/issue

See ALSO
MOTD (5), Agetty (8), Mingetty (8)

Colophon
This page was part of release 3.53 of the Linux man-pages project.
A description of the project, and information about reporting bugs,
Can is found at http://www.kernel.org/doc/man-pages/.

Linux 1993-07-24 ISSUE (5)
Manual page issue (5) line 7/27 (END) (press H-Help or Q-to-quit)
From here we do not seem to get too much information, but we know from here issue in the name of the display before the login information and identity file, is a text file, for a text file we should be able to edit it, so we can use gedit/etc/issue to see, What does it say?

We can see that there is a system version number and kernel information, which is the information displayed when the native character logs in.
How to display the current login terminal number, host name and time? At first I wrote a TTY (current terminal) in issue text file date (time) Hosttime (hostname)
And then new into the terminal, but found that the situation

Please forgive me for being a little white-.-!
Well, then we'll just have to go to man issue.
Just in the see also prompted me to go to its file look
Tried to try the man in the heart MOTD
Inside the content when this:
[email protected] ~]# man MOTD
MOTD (5) Linux Programmer ' s Manual MOTD (5)

NAME
Motd-message of the day

DESCRIPTION
The contents OF/ETC/MOTD is displayed by login (1) after a suc?
Cessful Login But just before it executes the login shell.

   The abbreviation "motd" stands for "message of the day",  and  this   file has been traditionally used for exactly that (it requires much   less disk space than mail to all users).

FILES
/etc/motd

See ALSO
Login (1), issue (5)

Colophon
This page was part of release 3.53 of the Linux man-pages project.
A description of the project, and information about reporting bugs,
Can is found at http://www.kernel.org/doc/man-pages/.

Linux 1992-12-29 MOTD (5)
Manual page MOTD (5) line 9/29 (END) (press h for help or Q to quit)
found it doesn't seem to work, okay, go on, and Two
man Agetty
content much, my English is not good, go directly next. Here are a few things you can use shortcut keys to quickly page through or find a letter
F down page
B up one page
D down half page
u up half page
G Skip to last
G Jump to home
search keyword
/keyword n Down n up
? keyword n up
Q to exit man
Continue man Mingetty
This is a lot more, but less than that. Search for keywords, hostname (said how to search for keywords)
Finally found the information I need: The

/t/n/L represents the time, hostname, terminal, add these three to the issue text file to be able to

then by the way the Chinese man installation and use method.
First download a Chinese man package and then mount it via Mount/dev/cdrom/media
Rpm-ivh/meida/packages/man ... The back is too long. ^.^
When installation is complete, you need to use Man-aw command to try it successfully
Example:
[[email protected] ~]# man-aw ls
/ usr/share/man/man1/ls.1.gz
/usr/share/man/zh_cn/man1/ls.1.gz
/usr/share/man/man1p/ls.1p.gz
This shows that the Chinese package has been installed.
Use:
Use the man command directly when the system will automatically select the first, that is, the English version of the explanation
we need to use MAN-A command
This command will be executed in order one by one, that is, according to Man-aw LS below the order shown in one execution.
Example
Man-a ls
The first display is the English version

Click the Q key to exit the first, then press ENTER to enter the second, that is, the Chinese version of the explanation.

On the charm of men in Linux-man

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.