Method sharing that effectively remembers Linux commands

For Linux users, both the rookie stage and the big god stage are often wary of the command line: a lot of commands that need to be remembered are really painful. Mastering commands is a prerequisite for using efficient command line tools.

However, there is almost no shortcut to this painful study. You must remember and practice a little bit. But there is no way to go, there are still a lot of tools in your initial stage of learning to help you.

History

First of all, I want to nominate the command line tool history. When using this command, you can view the commands you have used before. The Linux Shell, which includes the most widely used Bash, has a dedicated folder to store the commands you have entered. Take Bash as an example, this file is usually /home/ /.bash_history.

You can open this file with almost all text editors for browsing and searching history operations because the file is stored in plain text format.

Apropos

In addition to history, we have another command that can help you "discover" other commands. After this command is used, it will list all the commands that match the options according to your search criteria, along with some short explanations. For example, if you suddenly want to know how to list the contents of the directory, you can enter the following command:

Apropos"list directory"

This will search for the results, very straightforward. Now let's test another operation and add a plural to the "directory".

Apropos"list directories"

Unfortunately, this time it won't work. Why is this? Apropos is actually searching for command descriptions. If your search criteria don't match, then there will be no 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"

You will think that there should be some matching content, such as grep right? In fact, apropos will only search according to your requirements, as long as it is not an exact match, the search will fail.

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

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.

Ejector Header Connector

Ejector Header Connector,Ejector Header Smt Connector,Ejector Header Right Angle Connector,Ejector Header Straight Connector

Dongguan Yangyue Metal Technology Co., Ltd , https://www.yyconnector.com