The apropos
command helps you find commands related to a specific keyword. This is incredibly useful when you know what you want to do, but you're not sure which command to use.
- Use
apropos
to find commands related to "password":
apropos password
Type this command and press Enter. You'll see a list of commands that have "password" in their descriptions.
- The output might be quite long. Each line will show a command followed by a brief description. For example, you might see something like:
passwd (1) - change user password
This tells you that the passwd
command is used to change user passwords. The (1)
indicates that this is in section 1 of the manual (user commands).
- Now try another keyword, like "file":
apropos file
This will show you commands related to file operations. Again, the list might be quite long â there are many commands in Linux that deal with files!
- If you want to narrow down the results, you can use grep to filter the output. For example:
apropos file | grep create
This will show only the commands related to "file" that also mention "create" in their description.
Remember, apropos
is a great tool when you're not sure which command you need. Just think of a keyword related to what you want to do, and apropos
can help you find the right command.