

Recall Forgotten Linux Commands Using Apropos - OSTechNix
source link: https://ostechnix.com/easily-recall-forgotten-linux-commands/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How To Easily Recall Forgotten Linux Commands Using Apropos
Written by sk
Published: November 15, 2017Last Updated on November 21, 20223.1k 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:
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
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.
Recommend
-
145
Feel bored at work? Come on guys, let us play Piano! Yeah, you read it right. Who needs a real Piano? We can now play or learn how to play Piano from command line using our PC keyboard. Meet Piano-rs - a simple utility, written in...
-
123
Howdy Music lovers! Today I learned that we can control media players from commandline in Unix-like operating systems. You can play, pause, toggle between play and pause, increase/decrease volume, switch to next/previous media files, and stop the...
-
111
Nowadays, I have learned to use CLI mode efficiently in my Linux desktop. Working from commandline is fun, fast, safe and recommended way to learn Linux. Everyday, I spend so much time on all Linux...
-
55
This guide explains how to find the mounted filesystem type in Linux operating systems.
-
23
The alt is a command line tool that helps you to switch between different versions of commands in Unix-like operating systems.
-
48
Display CLI Commands Explanation In Terminal
-
2
-
11
Sascha Faller June 23, 2022 1 minute read
-
5
玩Linux的朋友有没有这种体会,就是Linux非常棒,但是就是命令多,记不住,有时候碰到不会的命令还得百度或者谷歌,极大的影响了工作效率。有没有一种办法,能够在记不住某个命令或者记不全某个命令的时候不用上网查或者翻手册就能找到这个命令?答案...
-
4
command 使用apropos搜索可用的Linux命令 如果你使用了某个命令但不记得它的确切名称,您可以在终端中使用ctrl+r键盘快捷键并通过shell的历史进行反向搜索...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK