--help option
If you only want to look up the options of a certain command, try entering the command followed by a blank and --help. This --help option exists for many commands. For example, ls --help displays all the options for the ls command.
Manual Pages
To learn more about the various commands, you can also use the manual pages. Manual pages also give a short description of what the command does. They can be accessed with man followed by the name of the command, for example, man ls.
The man pages are displayed directly in the shell. To navigate them, move up and down with Page ↑ and Page ↓. Move between the beginning and the end of a document with Home and End. End this viewing mode by pressing Q. Learn more about the man command itself with man man.
Info Pages
Info pages usually provide even more information about commands. To view the info page for a certain command, enter info followed by the name of the command, for example, info ls. You can browse an info page with a viewer directly in the shell and display the different sections, called “nodes.” Use Space to move forward and <— to move backwards. Within a node, you can also browse with Page ↑ and Page ↓ but only Space and <— will take you also to the previous or subsequent node. Like for the man pages, press Q to end the viewing mode.
Note that man pages and info pages do not exist for all commands: sometimes both are available (usually for key commands), sometimes only a man page or an info page exists, sometimes neither of them.
0 comments:
Post a Comment