Skip to content

apropos Command Cheat Sheet

apropos searches the manual page names and descriptions for keywords. It's invaluable when you know what you want to do but don't know the exact command name. Essentially, it's a search engine for Linux commands.


Synopsis

apropos [OPTIONS] keyword ...

Description

apropos searches the whatis database (built from manual page descriptions) and displays short descriptions of system commands that match the keyword. It's equivalent to man -k.


Basic Usage

Search for Keyword

apropos copy

Shows commands related to "copy".

Multiple Keywords

apropos file copy

Shows commands matching either "file" OR "copy".

Exact Phrase

apropos "copy files"

Searches for the exact phrase.


Common Searches

File Operations

apropos copy
apropos move
apropos delete
apropos rename
apropos compress

Network Commands

apropos network
apropos socket
apropos tcp
apropos wireless

System Administration

apropos user
apropos group
apropos permission
apropos service
apropos process

Text Processing

apropos search
apropos replace
apropos pattern
apropos filter

Options

-s, --section

Search specific manual section:

apropos -s 1 passwd
apropos --section 1 network

Manual sections: - 1: User commands - 2: System calls - 3: Library functions - 4: Special files - 5: File formats and conventions - 6: Games - 7: Miscellaneous - 8: System administration commands

-a, --and

Match ALL keywords (AND logic):

apropos -a copy file

Shows only commands matching both "copy" AND "file".

-e, --exact

Match exact keyword:

apropos -e cp

Matches exactly "cp", not "tcp" or "scp".

-w, --wildcard

Enable wildcard matching:

apropos -w 'net*'

Matches "network", "netstat", etc.

-r, --regex

Use regular expressions:

apropos -r '^net'
apropos --regex 'copy|move'

-i, --ignore-case

Case-insensitive search (default):

apropos -i NETWORK

-l, --long

Don't trim output to terminal width:

apropos -l network

-C, --config-file

Use alternative man configuration:

apropos -C /path/to/man.conf keyword

Practical Examples

Find Copy Commands

apropos copy

Output might include:

cp (1) - copy files and directories
scp (1) - secure copy (remote file copy program)
rsync (1) - fast incremental file transfer

Search for Text Editors

apropos editor
apropos edit

Find Compression Tools

apropos compress
apropos archive

Network Diagnostics

apropos -a network test
apropos ping
apropos trace

User Management

apropos -a user add
apropos password

Find Configuration Files

apropos -s 5 config

Section 5 contains file format descriptions.

Process Management

apropos process
apropos kill
apropos signal

Advanced Usage

Combine with Grep

apropos network | grep wireless
apropos compress | grep -i tar

Multiple Sections

apropos -s 1,8 network

Searches sections 1 and 8 only.

Regex Patterns

# Commands starting with 'net'
apropos -r '^net'

# Commands ending with 'stat'
ap ropos -r 'stat$'

# Commands containing numbers
apropos -r '[0-9]'

Find System Calls

apropos -s 2 file
apropos -s 2 socket

Section 2 contains system calls.

Library Functions

apropos -s 3 string
apropos -s 3 printf

Section 3 contains library functions.


Search Strategies

When You Don't Know the Command

# Want to download files?
apropos download

# Need to monitor system?
apropos monitor

# Want to schedule tasks?
apropos schedule
apropos cron

Troubleshooting

# Network issues
apropos network | grep -E 'test|debug|trace'

# Disk problems
apropos disk | grep -E 'check|repair|scan'

# Performance
apropos performance
apropos benchmark

Discovery

# What can I do with files?
apropos file | less

# What networking tools exist?
apropos network | wc -l  # Count them
apropos network | sort   # Sort alphabetically

Database Management

Update Database

sudo mandb

Rebuilds the whatis database. Run this if: - Newly installed packages don't show up - apropos returns "nothing appropriate" - Manual pages were recently updated

Check Database Location

manpath

Shows where manual pages are stored.


Comparison with Other Tools

apropos vs man -k

apropos copy
man -k copy

These are identical - apropos is essentially man -k.

apropos vs whatis

# apropos: searches descriptions
apropos copy

# whatis: searches exact command names only
whatis cp
whatis copy  # Won't find "cp"

apropos vs which

# apropos: finds commands by description
apropos editor

# which: shows path of executable
which vim

Common Use Cases

Learning New Domain

# Just started with Docker?
apropos docker

# Learning about filesystems?
apropos filesystem
apropos mount

Finding Alternatives

# Want alternatives to ps?
apropos process | grep list

# Other compression tools besides gzip?
apropos compress

Forgotten Commands

# "What was that network tool again?"
apropos -a network interface

# "How do I change permissions?"
apropos permission
apropos chmod

Output Format

Typical output:

cp (1) - copy files and directories
cpan (1) - easily interact with CPAN from the command line
cpio (1) - copy files to and from archives

Format: command (section) - description


Tips and Best Practices

  1. Start Broad - Begin with general terms, narrow down
  2. Use Multiple Keywords - Try different related words
  3. Combine with Grep - Filter results for relevance
  4. Check Sections - Use -s to limit to relevant sections
  5. Update Database - Run sudo mandb if results seem incomplete
  6. Use Regex - Powerful for pattern-based searches
  7. Read Descriptions - The description helps identify the right tool
  8. Follow Up with Man - Use man command to read full documentation
  9. Case Doesn't Matter - Search is case-insensitive by default
  10. Try Synonyms - "remove" vs "delete", "list" vs "show"

Troubleshooting

"nothing appropriate" Error

# Rebuild database
sudo mandb

# Check if manual pages exist
ls /usr/share/man/man1/

# Try exact match
apropos -e ls

Too Many Results

# Use AND logic
apropos -a file copy

# Use exact match
apropos -e tar

# Grep for specific term
apropos file | grep compress

Missing Results

# Update database
sudo mandb

# Check manual path
manpath

# Try different keywords
apropos archive  # instead of "compress"

Real-World Scenarios

New System Administrator

# What user management commands exist?
apropos user
apropos group
apropos password

# Service management?
apropos service
apropos systemd

Developer

# Debugging tools?
apropos debug
apropos trace

# Build tools?
apropos compile
apropos make

Network Engineer

# Network diagnostics?
apropos -a network test
apropos -a network monitor

# Firewalls?
apropos firewall
apropos iptables

Environment Variables

MANPATH

export MANPATH=/custom/man:/usr/share/man
apropos command

Defines where to search for manual pages.

PAGER

export PAGER=less
apropos network | $PAGER

Integration with Other Tools

With fzf (Fuzzy Finder)

apropos '' | fzf

Interactive search of all commands.

With Rofi/Dmenu

apropos '' | rofi -dmenu -p "Man pages"

GUI selector for commands.

In Scripts

#!/bin/bash
# Find all network-related commands
commands=$(apropos -a network interface | awk '{print $1}')
for cmd in $commands; do
    echo "=== $cmd ==="
    man "$cmd" | head -n 20
done

Quick Reference

Command Description
apropos keyword Search for keyword
apropos -s 1 keyword Search in section 1
apropos -a word1 word2 Match ALL keywords
apropos -e exact Exact match only
apropos -r 'regex' Regex search
apropos -w 'wild*' Wildcard search
apropos '' \| less Browse all commands
sudo mandb Update database
man -k keyword Same as apropos

Exit Status

Code Meaning
0 Success, matches found
1 No matches found
16 Usage or syntax error

Manual Page Sections

Section Contents
1 User commands
2 System calls
3 Library functions
4 Special files (devices)
5 File formats and conventions
6 Games and demos
7 Miscellaneous
8 System administration commands
9 Kernel routines