What command to run? Use Apropos

If you are new to Linux/Unix and have been around the forums, websites and maybe the irc channels. You might of wondered how do these guys know all of these commands, when there are so many commands available.

Well I’m here to tell you a secret noone remembers all the commands in linux. What sets apart those who seem to know all the commands, to those who don’t know is that they know how to find the commands.

Besides looking for the commands in Google there is a feature in Linux and also available in most Unix operating systems that can help you find commands. The command is called ‘Apropos’. This command is so simple to use, just use the command as follows.

apropos keyword

The keyword being what type of command you want for example. If you want to know how to find user commands. The following will give you a whole list of commands which have some use to users.

apropos user

If you tried the command you would notice that it gives way too many commands to go through, besides piping to the more command. It’s a good idea to pipe to grep so that you can help find the correct command. By using grep modify I can find any commands that are used to modify users.

apropos user | grep 'modify'

The result shows that there is only one command available that is used to modify users.

[root@Fusion ~]# apropos user | grep modify
usermod              (8)  - modify a user account
[root@Fusion ~]# 

That is all to using the ‘apropos’ command and I hope you will find it useful.

One Comment

  1. Andrew A. Sailer said:

    This is great stuff, thanks!

    November 24, 2010

Leave a Reply