Home Linux Commands How To Easily Recall Forgotten Linux Commands Using Apropos

How To Easily Recall Forgotten Linux Commands Using Apropos

By sk
Published: Updated: 3.9K views

There are hundreds of Linux commands, and remembering all of them is absolutely impossible. Besides, it is not necessary though. At times, my mind goes completely blank and I couldn't remember a particular command. I keep looking at the Terminal and try to remember the command, but can't. If you are anything like me, I've got a good news for you. Thanks to Apropos command and BASH history, it is very easy to recall forgotten Linux commands.

Apropos is a Linux command that searches the manual page names and descriptions by using a given keyword or string. It comes pre-installed in most Linux distributions.

Easily Recall Forgotten Linux Commands Using Apropos

Let say you forgot the command to list the contents of a directory. Let us see if apropos can help us in this regard.

$ apropos "list directory"

Sample output:

Easily Recall Forgotten Linux Commands Using Apropos

Easily Recall Forgotten Linux Commands With "apropos" Command

See? The apropos command displays the list of suggested commands that matches for the given search string. As you see in the example, we can use "dir" command to list a directory contents.

I know it is easy to remember "dir" command, but I have used it here to demonstrate the purpose of Apropos command. You can use any search string. But, some times you need to be more specific when using search strings. For example, the following command will display all commands that contains the word "list".

$ apropos "list"

In such cases, apropos will not help you to find what you're looking for.

Let me show you another example. Want to find the Linux Kernel details, but you forgot the actual command? Here is how you can find it out.

$ apropos "kernel"

Or, run it without quotes:

$ apropos kernel
List related commands to find Linux Kernel details using apropos

List related commands to find Linux Kernel details using apropos

In this case, we can use "uname" command to know the details of Linux Kernel.

Please note that you must use quotes when the search string has more than one word.

I forgot the command to access my remote system? What to do? No worries! Use the following command to find out what it is!!

$ apropos "remote"

Be mindful that the Apropos command will display all possible commands that has the search string in their description. So, you might have to scroll through the results and pick the command that suits you.

For more details, refer man pages.

$ man apropos

OK, I forgot some lengthy commands that I used few days ago, how to remember them?

No problem. I know a few ways to remember the forgotten Linux commands.

Do a quick reverse search by pressing "CTRL+R" and type the first few letters of the command you're looking for. You will see the list of suggested commands from the bash history. Use UP/DOWN arrow keys to navigate through commands. Once you find out the actual command, press TAB or right arrow key to choose that command and press ENTER key to execute.

Alternatively, you can save or bookmark or apply tags to the important and frequently used commands, so you can use them later without having to search on websites or man pages. Refer the following links for more details.

You May Also Like


Dan November 20, 2019 - 1:33 am

I use ‘TLDR pages’ which is a simplified man pages with examples. Apropos is also good.

Enrique November 21, 2019 - 12:59 am

I have a different approach. Many times just knowing a command is not enough. We need more context. Cheatsheets can help, but are not enough, so I decided to take a different approach:



Pull-request from brave software and admin warriors are welcome!

sk November 21, 2019 - 12:29 pm

Appreciate your work. I will look into it. Thanks.


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More