how.wtf

What is the apropos command in Linux

· Thomas Taylor

Recently, I was made aware of the apropos command in Linux. What is it? What is it used for?

What is the apropos command?

apropos enables users to search terminal commands based on a keywords or descriptions.

This is an incredibly useful tool because it quickly identifies commands based on man pages.

Scenario: I forgot the command name for the qalculate CLI I installed.

1% apropos calculator
2qalc(1)                  - Powerful and easy to use command line calculator
3transicc(1)              - little cms ColorSpace conversion calculator
4bc(1)                    - arbitrary-precision decimal arithmetic language and calculator
5dc(1)                    - arbitrary-precision decimal reverse-Polish notation calculator
6bc(1)                    - arbitrary-precision decimal arithmetic language and calculator
7dc(1)                    - arbitrary-precision decimal reverse-Polish notation calculator

qalc was the first result.

Nothing appropriate error

If the man database is not updated, apropos may report an error when looking up commands:

1% apropos calculator
2calculator: nothing appropriate.

To fix it, update the man pages:

1mandb

#Linux  

Reply to this post by email ↪