---
title: "我使用过的Linux命令之apropos - 根据关键字搜索命令"
author: "codingstandards"
date: "2010-09-30T14:25:36Z"
tags: ["Blog", "Linux", "Perl", "Web"]
categories: ["操作系统"]
slug: "linux-apropos"
draft: false
lastmod: "2010-10-24T08:05:38Z"
id: 776024
url: "https://codingstandards.iteye.com/blog/776024"
---

# 我使用过的Linux命令之apropos - 根据关键字搜索命令

本文链接：[http://codingstandards.iteye.com/blog/774570](/blog/774570)    （转载请注明出处）

## 用途说明

因为Linux的Shell中使用的是命令行方式，有时候会忘记执行特定任务的命令，就可以使用apropos找出来。等同于man -k，在使用的时候还是觉得用man -k来的好，毕竟apropos这个命令有些难记。

此命令需要指定一个keyword作为参数，查找与该keyword有关的命令。手册页中的解释是：在whatis数据库中搜索字符串。search the whatis database for strings。

 

## 常用参数

无。

命令格式为：apropos keyword

等同于：man -k keyword

## 使用示例

### 示例一

\[root@web ~]# apropos who  
at.allow \[at]        (5)  - determine who can submit jobs via at or batch  
at.deny \[at]         (5)  - determine who can submit jobs via at or batch  
jwhois               (1)  - client for the whois service  
jwhois              (rpm) - Internet whois/nicname client.  
w                    (1)  - Show who is logged on and what they are doing  
who                  (1)  - show who is logged on  
who                  (1p)  - display who is on the system  
whoami               (1)  - print effective userid

\[root@web ~]# man -k who  
at.allow \[at]        (5)  - determine who can submit jobs via at or batch  
at.deny \[at]         (5)  - determine who can submit jobs via at or batch  
jwhois               (1)  - client for the whois service  
jwhois              (rpm) - Internet whois/nicname client.  
w                    (1)  - Show who is logged on and what they are doing  
who                  (1)  - show who is logged on  
who                  (1p)  - display who is on the system  
whoami               (1)  - print effective userid

从以上输出来看，apropos和man -k的输出是相同的。

### 示例二

\[root@web ~]# apropos apropos  
apropos              (1)  - search the whatis database for strings  
man                 (rpm) - A set of documentation tools: man, apropos and whatis.  
\[root@web ~]# man -k apropos  
apropos              (1)  - search the whatis database for strings  
man                 (rpm) - A set of documentation tools: man, apropos and whatis.

### 示例三

\[root@web ~]# apropos sort  
FcFontSort           (3)  - Return list of matching fonts  
alphasort \[scandir]  (3)  - scan a directory for matching entries  
bsearch              (3)  - binary search of a sorted array  
bsearch              (3p)  - binary search a sorted table  
bunzip2 \[bzip2]      (1)  - a block-sorting file compressor, v1.0.3  
bzip2                (1)  - a block-sorting file compressor, v1.0.3  
comm                 (1)  - compare two sorted files line by line  
ldap\_sort\_entries    (3)  - LDAP sorting routines  
ldap\_sort\_entries \[ldap\_sort] (3)  - LDAP sorting routines  
ldap\_sort\_entries \[ldap\_sort\_strcasecmp] (3)  - LDAP sorting routines  
ldap\_sort\_entries \[ldap\_sort\_values] (3)  - LDAP sorting routines  
ldap\_sort\_strcasecmp (3)  - LDAP sorting routines  
ldap\_sort\_strcasecmp \[ldap\_sort] (3)  - LDAP sorting routines  
ldap\_sort\_strcasecmp \[ldap\_sort\_entries] (3)  - LDAP sorting routines  
ldap\_sort\_strcasecmp \[ldap\_sort\_values] (3)  - LDAP sorting routines  
ldap\_sort\_values     (3)  - LDAP sorting routines  
ldap\_sort\_values \[ldap\_sort] (3)  - LDAP sorting routines  
ldap\_sort\_values \[ldap\_sort\_entries] (3)  - LDAP sorting routines  
ldap\_sort\_values \[ldap\_sort\_strcasecmp] (3)  - LDAP sorting routines  
qsort                (3)  - sorts an array  
qsort                (3p)  - sort a table of data  
sort                 (1)  - sort lines of text files  
sort                 (1p)  - sort, merge, or sequence check text files  
sort                 (3pm)  - perl pragma to control sort() behaviour  
tsort                (1)  - perform topological sort  
tsort                (1p)  - topological sort  
versionsort \[scandir] (3)  - scan a directory for matching entries

## 问题思考

## 相关资料

【1】51CTO.COM [Linux apropos命令详细列表](http://os.51cto.com/art/201006/206816.htm)

【2】建站教学网 [Linux命令行知识：apropos查找和sort相关的命令](http://www.jzread.com/server/linux/2010-06-30/1790.html)

【3】爱词霸在线词典 [apropos](http://www.iciba.com/apropos/)

 

返回 [我使用过的Linux命令系列总目录](/blog/786653)