Linux Study Notes Day 6 - Help Commands

Today I mainly record some simple help commands

1 man

This command can be used to view commands and configuration files. When you forget how to use a command, or how to configure a configuration file at a low level, what is the content recorded in it, you need to execute it. man command, for the simplest example

eg : man ls

The figure shows the information of the ls command, NAME describes the function of the command, SYNOPSIS describes the format of the command, and DESCRIPTION is the usage and explanation. Moreover, this page is like the less command, you can search by slash (/) and the character you want to search for, and also have other functions such as page turning, pressing q to exit. In addition, the man command can also view the information of the configuration file

eg : man services (remember, look at the information in the configuration file, do not write the absolute path (/etc/sercies))

This is the information about the configuration file services. Its name information is Internet nertwork services list, indicating that this is a file used to store the list of network services, and then we scroll down to find his fixed format

Found this sentence, ***and is of the form, I have some dishes in English, I always found this sentence to see, the following is the format of this configuration file, and, further down, there are explanations of each option , if not, ask the translation software. Like this service, see his explanation, the first is service-name, which is the service name, the second is the port or protocol, and the third is the alias, let's open this file to see.

See the yellow part, combined with the help document just now, this line means that his service name is ssh, the port is 22, the tcp protocol used, there is no alias, um, that's it, ok!

2 whatis

If you just want to see what a command does, without paying attention to how it is used, whatis is a good choice.

For example, if we execute whatis ls, let's take a look at the role of ls

As shown in the figure, after you execute it, you can see the description of the function. If you don't understand it, just flip it over.

3 apropos

This is used to see the function of the configuration file. In fact, it is basically the same as whatis, except that one is a command and the other is a file.

4 --help

Sometimes, you may know what this command does, but forget some specific options, then you can use --help

eg: ls --help After the execution is completed, you can see the specific functions inside.

5 help

The man command was mentioned above, now let's look at this

man cd

Looking at the above picture, do you think it is a bit different? In fact, after you execute man cd, what you see is not the help document of the cd command. If you check it carefully, you will find that there are many commands under NAME, which are listed here. All the built-in shell commands have come out. The built-in shell commands cannot be found by man. At this time, you need to use the help command.

ok, that's it! ! ! !

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326995331&siteId=291194637