
command --help and man command are the two most important tools at the command line.
Virtually all commands understand the -h (or --help) option which will produce a short usage description of the command and its options, then exit back to the command prompt. Type:
man -h
or
man --help
to see this in action.
Every command and nearly every application in Linux has a man (manual) file. It is as simple as typing man command to bring up a longer manual entry for the specified command. For example:
man mv
brings up the mv manual.
使用箭头键在 man 文件中上下移动,用 q 键退回到命令提示符。
man man
brings up the manual entry for the man command, which is a good place to start.
man intro
is especially useful. It displays the “introduction to user commands” which is a well-written, brief introduction to the Linux command line.
There are also info pages, which generally go into more detail than man pages. Try:
info info
for the introduction to info pages.