Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

apropos, whatis

Search the short descriptions of the man pages (apropos), or show the description of one page (whatis).

Niveau
RHCSA-examen
Groep
Shell en hulp
Root nodig
Nee
Pakket
man-db
Ook
whatis

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

Wat het doet

  • apropos WORD (same as man -k WORD) lists every man page whose name or short description contains WORD. Use it when you do not know which command does a job.
  • whatis NAME (same as man -f NAME) shows the one-line description of a page, for every section where it exists.

Both read the database that mandb builds. If they say "nothing appropriate", run mandb as root.

Zo schrijf je het

apropos [OPTIONS] KEYWORD ...
whatis [OPTIONS] NAME ...

Opties 15

Meest gebruikt

-e, --exact
apropos: the keyword must match a whole name or a whole word of the description.
-a, --and
apropos: show only pages that match all keywords.
-r, --regex
Treat each keyword as a regular expression (the default for apropos).
-w, --wildcard
Treat each keyword as a shell wildcard like pass*.
-l, --long
Do not cut long lines to the screen width.
-s, --sections=list
Search only these sections, like -s 8 or -s 1:8.
-m, --systems=list
Search the pages of other systems.
-M, --manpath=path
Search these folders instead of $MANPATH.
-L, --locale=locale
Use this language.
-C, --config-file=file
Use another configuration file.
-v, --verbose
Print more messages.
-d, --debug
Print debug information.
-?, --help
Show help.
--usage
Show a short usage message.
-V, --version
Show the version.

Voorbeelden 11

$ als gewone gebruiker# als root (of met sudo)

  1. 1Find commands about a topic

    apropos partition

    Same as man -k partition.

  2. 2Find only admin commands (section 8)

    apropos -s 8 volume

    Shows lvcreate, vgcreate, pvcreate … but not library functions.

  3. 3Show what a command is

    whatis chage
    chage (1)            - change user password expiry information

    One line, the fastest reminder.

  4. 4Match all words, not one of them

    apropos -a firewall zone

    Only pages that mention both words.

  5. 5Match a whole word only

    apropos -e cron

    Avoids matches like "crontab" when you want exactly "cron".

  6. 6Use a wildcard

    apropos -w 'ssh*'

    Pages that start with ssh: ssh, ssh-keygen, ssh-copy-id, sshd_config …

  7. 7Find the page of a config file

    apropos -s 5 resolv
    resolv.conf (5)      - resolver configuration file

    Section 5 has the file formats.

  8. 8Check what several commands do at once

    whatis ss ip nmcli dig

    A quick reminder table in the terminal.

  9. 9Find SELinux pages of a service

    apropos -s 8 _selinux | grep httpd

    Needs the package selinux-policy-doc. Very useful in the SELinux tasks.

  10. 10Long lines without cutting

    apropos -l "security context"

    Full descriptions, even in a small terminal.

  11. 11Fix an empty search

    mandb
    apropos user

    Build the database first when the system is new.

Let op

  • apropos searches only the short description, not the full text. For full text use man -K.
  • The results depend on the installed man pages; minimal systems have fewer pages.

Tips om te onthouden

  • apropos = "which command for this job?" whatis = "what is this command?"

Volledige handleiding

Deze pagina legt het commando uit in eenvoudige woorden. De originele handleiding heeft elk detail.

In je terminal: man apropos