apropos command in Linux is a powerful tool for discovering and searching for commands and their descriptions. It’s like a command-line encyclopedia that helps you find the right command for a specific task.
In this article, we’ll dive into the essentials of using the
apropos command in Linux, complete with practical examples to help you master command discovery and utilization.
This article is a follow-up to the previous 90 Linux Commands frequently used by Linux Sysadmins post. As time allows, I will continue to publish articles on each of these 90 commands geared toward Linux sysadmins and Linux power users.
Before we dive into examples, let’s understand the basic syntax of the
keyword(s): These are the search terms or keywords you want to use to find relevant commands and their descriptions.
The primary function of the
apropos command is to discover and search for commands. Here’s how to use it:
For example, if you want to find commands related to file compression, you can use:
This command provides a list of commands related to compression, making it easy to find the right tool for your task.
apropos Detailed Descriptions
apropos command not only lists commands but also provides detailed descriptions. This is helpful for understanding what each command does. For instance:
This command lists network-related commands along with their descriptions, making it easier to choose the right one for your networking needs.
apropos Wildcard Searches
You can use wildcard characters with
apropos to broaden your search. For example:
This command searches for commands related to files, including those with names like “file,” “files,” and so on.
apropos command can sometimes produce a lengthy list of results. To filter these results, you can pipe them to other commands. For example:
apropos text | grep -i search_term
This command combines
grep to filter the results and display only those that match the search term, ignoring case.
apropos command is a valuable tool in Linux for discovering and searching for commands and their descriptions. Whether you’re a beginner looking for the right command or an experienced user seeking alternatives,
apropos can save you time and effort in finding the right tool for the job.
If you’re interested in expanding your knowledge of Linux commands and want to explore more frequently used commands by Linux sysadmins, I recommend checking out the parent article at the following link: 90 Linux Commands Frequently Used by Linux Sysadmins.