19 Mei, 2007

Learning Linux Commands

If you are a complete newbie to Linux, or if you “know enough to be dangerous,” then here are some pointers that may help.

One of the great things about Linux is that, even though the operating system is extensible through the addition of arbitrary commands, there are standards for documenting such commands. Because of these standards, not only is it easy to find out what a command does and how it works, but it’s easy to find out that these commands exist in the first place, even if you don’t know their names.

Commands About Commands:

- man — Display the manual for a command
- whatis — Display a summary of a command (rather than the entire manual)
- apropos — Display a list of commands that pertain to (are apropos to) a keyword
- whereis — Display information about the location of a command: the executable, the source code (if any), and the man pages.
- which — Display which version of a command will execute (for when there are two, or more, commands with the same name installed on the system).

MAN — In previous tips, we mentioned the MAN command. MAN stands for manual. It is the main resource for displaying the documentation (a.k.a. “man pages”) for any particular command. For example, to find out how the LS command works, you would enter

man ls

The man command brings up the first page of the manual, and then waits for navigation keystrokes. The three most commonly used navigation controls are PageUp, PageDown and the letter q (quit). Of course, man has its own man pages.

man man

WHATIS — The whatis command is actually an alias for using the man command with the -f switch (and -f is shorthand for –whatis). So, all of the following are equivalent.

whatis ls
man -f ls
man –whatis ls

0 komentar: