Five major tools for learning and remembering Linux commands

Linux novices are often afraid of the command line. Part of the reason is because you need to memorize a large number of commands. After all, mastering commands is a prerequisite for efficient use of the command line.

Unfortunately, there are no shortcuts to learning these commands, but some tools can still help you as you begin to learn the commands.

History

Five major tools for learning and remembering Linux commands

The first thing to introduce is the command line tool history, which helps you remember the commands you have used. Most Linux shells, including the most widely used Bash, create a history file that contains the commands you have entered. If you are using Bash, this history file is /home/ /.bash_history.

This history file is in plain text format and can be viewed and searched with any text editor.

Apropos

There is indeed a command that can help you find other commands. This command is apropos, which can help you find the right command to complete your search. For example, suppose you need to know which command can list the contents of the directory, you can run the following command:

Apropos"list directory"

Five major tools for learning and remembering Linux commands

This will search for the results, very straightforward. Give "directory" a plural and try again.

Apropos"list directories"

This time it is useless. What apropos does is actually a description of a series of commands. Commands that describe mismatches are not included in the results.

There are other uses. With the -a flag, you can increase your search keywords in a more flexible way. Try this command:

Apropos"match pattern"

Five major tools for learning and remembering Linux commands

Do you think there should be some matching content, such as grep right? However, it does not match any results. Again, apropos will only search based on literal content.

Now let's try to separate the words with the -a flag. (LCTT: This option means "and", that is, multiple keywords exist, but do not need to be exactly the strings that are connected together.)

Apropos"match" -a"pattern"

This time, you can see a lot of expected results.

Apropos is a great tool, but you need to be aware of its flaws.

ZSH

Five major tools for learning and remembering Linux commands

ZSH is not really a tool for memorizing commands. It is actually a shell. You can use ZSH instead of Bash as your command line shell. ZSH includes an automatic error correction mechanism that gives you a hint when you enter a command. When this feature is turned on, it will prompt you for a similar selection. In ZSH you can use the command line as usual, and you can enjoy extremely secure networks and other very useful features. The easiest way to get the most out of ZSH is to use Oh-My-ZSH.

Shorthand table

Finally, perhaps the most common method is to use a shorthand table.

There are a lot of online shorthand tables, such as this, which can help you quickly query commands.

For quick queries, you can look for a shorthand sheet in image format and set it to your desktop wallpaper.

This is not the best way to remember commands, but doing so can save you time searching for forgotten commands online.

Relying on these methods while learning, you will eventually find that you will use these tools less and less. No one can remember everything, so it's normal to forget something or occasionally encounter something you haven't seen before. This is also the meaning of these tools and the existence of the Internet.

BREADBOARD JUMPER WIRE

Breadboard Jumper Wire,Breadboard Wires,Breadboard Cables,Breadboard Jumper Cables

Cixi Zhongyi Electronics Factory , https://www.cx-zhongyi.com

Posted on