Getting help is the first command to be mastered in Linux. Linux provides very detailed help tools and documents, so you must get into the habit of checking help documents (there is no need to remember everything ), this greatly reduces memory and improves efficiency.
I. help Command
Applicable to internal commands
Example:
Copy codeThe code is as follows: # type cd
Cd is a shell builtin
# Help cd
# Type ls
Ls is aliased to 'ls -- color = auto'
# Help ls
-Bash: help: no help topics match 'Ls'. Try 'help help' or 'man-k LS' or 'info ls '.
II. Command-help/-h
Applicable to external commands
For example:
Copy codeThe code is as follows:
# Ls -- help
3. man Command
Example:
Copy codeThe code is as follows:
# Man cd
Note: manual manuals are divided into chapters; man # Command (# indicates the chapter number)
1. commands available to all users
2. system kernel call. not every command has a system call (for example, man 2 read)
3. database call
4. special files, such as/dev/tty1
5. file format (command configuration file syntax, such as man 5 passwd)
6. game problems
7. Miscellaneous
8. administrator commands, such as fdisk
For man command query operations, refer to the command mode in vi, vim usage
Understand man command syntax
[]: Optional
<>: Required content
A | B | c: select one more
... : There can be multiple
IV. info Command
There is a hyperlink to the document. info is the information page, providing the Author, version, and when to release more detailed information. man manual tells you how to use it.
V. README
Most programs have corresponding help documents stored in the/usr/share/doc folder.
For example:
# Ls/usr/share/doc/ntp-4.2.4p8/
ChangeLog COPYRIGHT NEWS
6. Google
If you have any questions, refer to the official project documents first.