Instead of asking AI or searching on the Internet, using the manuals within you system ensures it complies with your system exactly, not something generally assumed. And you can use it without Internet, and get it faster.
Get the system reference manual of a command by execute man command, like
#show the manual of command man
man man
For learning purposes, reading the SYNOPSIS, DESCRIPTION, EXAMPLES, and NOTES sections, skimming the available groups of options, don't read linearly. For man pay attentions to:
# Searches names
man -f [whatis options] page ...
# Searches both names and descriptions for the keyword as a substring/regex.
man -k [apropos options] regexp ...
# Searches for text in all manual pages
man -K [man options] [section] term ...
When you encounter something you don't know or unfamiliar with, using these commands to find its manuals for helps.
command --help can give you a help list of the command, like dnf --help. It is very helpful to remind you what commands or options you need to use. And, get a glance of the whole picture.
On that note, execute man less to see how to use it. The most import command of less is h , giving you the help. You might use daily
-
j/kscroll up/down -
Space/bpage forward/back -
/patternsearch -
n/Nnext/previous match -
g/Gjump to top/bottom -
qquit
Now you can use these command to help you read the manuals, as they are displayed by less. When you are reading a manual, you can use /^EXAMPLES to jump between sections.
Using curl cheat.sh/command, you can get a cheat list of the command, like
curl cheat.sh/apt
It is quite concise and practical. You will not remember all commands and options that you only use casually. Manuals is too long, --help is to short, this is the best option for real uses.
Top comments (0)