Using --help
The first thing you should try is --help. Most command have this option. The syntax is command --help. It'll display information about the command. Here is an example of --help:luzar@ubuntu:~$ ls --helpAs you can see from the example above, --help is used with Ubuntu command to display help about the command's usage and options available.
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
Ubuntu help using man command
The man command is used to read the online reference manuals. Perhaps the man command is the most famous help in Ubuntu and other Unix-based system. It's a bit weird, but to open man manual, type man man. Here is a part of manual page about man command:NAMEUbuntu (and all Linux) administration command manual is in section 8. You can see a section number is printed at the top of the page every time you open the manual page. See an example below:
man - an interface to the on-line reference manuals
SYNOPSIS
man [-c|-w|-tZ] [-H[browser]] [-T[device]] [-X[dpi]] [-adhu7V] [-i|-I]
[-m system[,...]] [-L locale] [-p string] [-C file] [-M path] [-P
pager] [-r prompt] [-S list] [-e extension] [--warnings [warnings]]
[[section] page ...] ...
man -l [-7] [-tZ] [-H[browser]] [-T[device]] [-X[dpi]] [-p string] [-P
pager] [-r prompt] [--warnings[warnings]] file ...
man -k [apropos options] regexp ...
man -f [whatis options] page ...
DESCRIPTION
man is the systems manual pager. Each page argument given to man is
normally the name of a program, utility or function. The manual page
associated with each of these arguments is then found and displayed. A
section, if provided, will direct man to look only in that section of
the manual. The default action is to search in all of the available
sections, following a pre-defined order and to show only the first page
found, even if page exists in several sections.
Here are the complete section numbers of the manual and the
types of pages they contain.
1 Executable programs or shell commandsNormally each manual page provides the information subject below:
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conven-
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- FILES
- SEE ALSO
- BUGS
- AUTHOR
Ubuntu help using whatis command
Another Ubuntu help available is whatis command. The different between man command and whatis command is, whatis displays only the description. Here is a part of whatis manual page:NAMEExample of Ubuntu help using whatis command:
whatis - display manual page descriptions
SYNOPSIS
whatis [-dlhV] [-r|-w] [-s section] [-m system[,...]] [-M path] [-L
locale] [-C file] name ...
DESCRIPTION
Each manual page has a short description available within it. whatis
searches the manual page names and displays the manual page descripâ
tions of any name matched.
name may contain wildcards (-w) or be a regular expression (-r). Using
these options, it may be necessary to quote the name or escape (\) the
special characters to stop the shell from interpreting them.
luzar@ubuntu:~$ whatis info
info (1) - read Info documents
info (5) - readable online documentation
luzar@ubuntu:~$
Ubuntu help using apropos command
Apropos command is another Ubuntu help for beginners. The apropos command search the manual page names and descriptions.NAMEExample using apropos to get help in Ubuntu system:
apropos - search the manual page names and descriptions
SYNOPSIS
apropos [-dalhV] [-e|-w|-r] [-s section] [-m system[,...]] [-M path]
[-L locale] [-C file] keyword ...
DESCRIPTION
Each manual page has a short description available within it. apropos
searches the descriptions for instances of keyword.
luzar@ubuntu:~$ apropos adduser
/etc/adduser.conf (5) [adduser.conf] - configuration file for adduser(8) and ...
adduser (8) - add a user or group to the system
adduser.conf (5) - configuration file for adduser(8) and addgroup(8) .
luzar@ubuntu:~$
Ubuntu help using info command
Another help you can get in Ubuntu is info command. Info command prints info documentations. You can use info command to read a complete information about certain topic in Ubuntu. The info command is like a book. Here is an information in manual page:NAMEExample of info command:
info - read Info documents
SYNOPSIS
info [OPTION]... [MENU-ITEM...]
DESCRIPTION
Read documentation in Info format.
luzar@ubuntu:~$ info cpio
As you see from the example above, info documentation is like a book. To read info documentation, you can use space bar to view next page. The up/down keys also can be used to scroll up/down the page.
No comments:
Post a Comment
Please keep comment relevant and strictly no spam will be tolerated. Thank you.