Linux常用命令-whatis

命令

whatis

描述

display manual page descriptions
显示命令简介

用法

1
whatis [-dlv?V] [-r|-w] [-s list] [-m system[,...]] [-M path] [-L locale] [-C file] name ...

选项

1
2
3
4
5
6
7
-v  显示详情
-r 正则搜索
-w 通配符搜索
-l 长格式显示,不换行
-L 如果一个命令同时有多个语言版本的man帮助,可以指定语言
-M 指定man文件路径
-s 指定man分类章节,可选1-9

注意

示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$ whatis mount
mount (8) - mount a filesystem
$ whatis -r mount
mount (8) - mount a filesystem
mountpoint (1) - see if a directory is a mountpoint
systemd-remount-fs (8) - Remount root and kernel file systems
systemd-remount-fs.service (8) - Remount root and kernel file systems
systemd.automount (5) - Automount unit configuration
systemd.mount (5) - Mount unit configuration
umount (8) - unmount file systems
$ whatis -w mount*
mount (8) - mount a filesystem
mountpoint (1) - see if a directory is a mountpoint

# 中文man帮助文件
$ ll /usr/share/man/zh_CN/man1/
-rw-r--r--. 1 root root 2317 Aug 9 2019 chage.1.gz
-rw-r--r--. 1 root root 2752 Aug 9 2019 gpasswd.1.gz
-rw-r--r--. 1 root root 1287 Aug 9 2019 newgrp.1.gz
-rw-r--r--. 1 root root 1127 Aug 9 2019 sg.1.gz
$ whatis -L zh_CN chage
chage (1) - 更改用户密码过期信息
# 指定man文件路径
$ whatis -M /usr/share/man/zh_CN chage
chage (1) - 更改用户密码过期信息