الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

apropos, whatis

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

المستوى
امتحان RHCSA
المجموعة
الطرفية والمساعدة
يحتاج root
لا
الحزمة
man-db
يُسمّى أيضًا
whatis

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

ماذا يفعل

  • 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.

طريقة الكتابة

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

الخيارات 15

الأكثر استخدامًا

-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.

أمثلة 11

$ مستخدم عادي# بصلاحية root (أو مع 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.

انتبه

  • 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.

نصائح للحفظ

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

الدليل الكامل

هذه الصفحة تشرح الأمر بكلمات بسيطة. الدليل الأصلي فيه كل التفاصيل.

في الطرفية: man apropos