在Linux系统中提供帮助的命令。通俗点来说它就是命令的使用手册。 它共分九个章节 1、用户命令
2、系统调用
3、C库调用
4、设备文件及特殊文件
5、配置文件格式
6、游戏
7、杂项
8、管理命令及守护进程
9、Linux内核API(CentOS7以后出现) 比如想知道某一个命令属于man的那一章节 我们可以用whatis command(命令) 例: whatis pwd [root@localhost ~]# whatis pwd pwd (1) - print name of current/working directory pwd (1p) - return working directory name pwd (3tcl)
该命令可以清楚显示该命令属于哪一个章节,此外Linux中有许多命令我们不可能都记得,我们可以根据通过对命令的man来了解 在这里举个例子说明: 在本机字符终端登陆时,除显示原有信息外,再显示当前登陆终端号,主机名,以及时间。提示: cat /etc/issue 通过man命令完成要求 以下是具体操作步骤: 1、提示中有关于issue,我们可以从issue下手,看一看有没有能帮助我们的信息 采用 man issue 获取信息 [root@localhost ~]# 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 is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be 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 for help or q to quit) 从这里我们好像没有得到太多的信息,但是我们从这里知道issue 中NAME中说时显示登陆前的信息和标识文件,是一个文本文件,对于一个文本文件我们应该可以去编辑它,所以我们可以用gedit /etc/issue 去看看,里面写了什么 我们可以看到里面有系统的版本号以及内核信息,也就是本机字符登陆时显示的信息。 那怎么显示当前登陆终端号,主机名和时间呢?一开始我在issue文本文件里写入了tty(当前终端)date(时间)hosttime(主机名) 然后从新进入终端,却发现时这样的情况 请原谅我是一个小白-.-! 好吧 那就只能再去man issue了 正好在SEE ALSO中提示让我去其文件看看 打着试试的心里 man了motd 里面的内容时这样的: [root@localhost ~]# man motd MOTD(5) Linux Programmer's Manual MOTD(5)

NAME motd - message of the day

DESCRIPTION The contents of /etc/motd are 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 is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be 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) 发现好像还是都没有用,好吧 ,继续,还有两个 man agetty 内容好多,我英文不好,直接下一个吧。这里提一下关于内容多的时候可以使用快捷键快速翻页或者查找某一个字母 f向下翻一页 b向上翻一页 d向下翻半页 u向上翻半页 G 跳至尾页 g 跳至首页 搜索关键字 /关键字 n 向下 N向上 ?关键字 n 向上
q 退出man 继续man mingetty 这个内容也不少,不过比那个要少多了 搜索一下关键字,hostname(上面说过如何搜索关键字) 终于找到我需要的信息: /t /n /l 分别表示的是时间,主机名,终端,把这三个添加到issue文本文件中就可以了 然后顺带说下中文man的安装和使用方法。 首先下载一个中文man的包,然后通过mount /dev/cdrom /media挂载 rpm -ivh /meida/Packages/man... 后面太长 大家按TAB键自动补齐吧……^.^ 当安装完成时需要使用man -aw command(命令)试一下是否成功 举例: [root@localhost ~]# 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 这里显示中文包已经安装完成。 使用: 直接使用man command时系统会自动选择第一个,也就是英文版的解释 我们需要使用 man -a command 这条命令会按照顺序一个一个的执行,也就是按照 man -aw ls下显示的顺序一个一个执行。 举例 man -a ls 第一个显示的是英文版 按一下q键 退出第一个,再按ENTER,进入第二个,也就是中文版的解释。