Linux provides help to its users to have a better experience . It helps the users in how to implement the commands, its usage, its format , its function etc. Let us see some of the Linux server basics help commands
The several helps available helps are:-
- -h or –help
- whatis ,makewhatis, apropos
- man , info
- /usr/share/doc
- /usr/share/doc/howto/en
- TLDP
- GUI based help by various distros
-h or –help :-
command [options] [arguments]
commands like ls, cat, man
Significance of space
Word options and Single letter options , – and —
arguments a.k.a parameters
whatis:-
whatis searches a set of database files containing short descriptions of system commands for keywords and displays the result on the standard output. Only complete word matches are displayed. The whatis database is created using the command makewhatis. Closely related commands include apropos and man
$whatis whatis:-
whatis (1) – search the whatis database for complete words
apropos :- The Underutilized Linux Command!! When you dont remember the command to use.
$whatis apropos:-
apropos (1) – search the whatis database for strings
What is the difference between whatis and apropos
whatis searches a set of database files containing short descriptions of system commands for keywords and displays the result on the standard output. Only complete word matches are displayed.
apropos searches a set of database files containing short descriptions of system commands for keywords and displays the result on the standard output.
apropos -> man -k
whatis -> man -f
Man:-
Man – manual
- man -S 5 command or man 5 command
- The less command is internally used to display ‘man’ pages
- The up and down arrow and other navigation keys may be used to move around the help page
- Pressing the ‘q’ key will ‘quit’ the page and bring up the command prompt again.
Structure of Man pages:-
NAME – Name of the command – short description which make to the whatis DB.
SYNOPSIS – Give a short overview on available program options. For functions this sections lists corresponding include files and the prototype so the programmer knows the type and number of arguments as well as the return type.
DESCRIPTION – Detailed overview of the command and the purport of each of its ‘-‘ options and other command line parameters.
OPTIONS – A description of how each option affects program behaviour.
COMMANDS – Instruction that can be given to the program while it is running
FILES – Lists configuration files, startup files, and files the program directly operates on
ENVIRONMENT – Lists all environment variables that affect your program or function
DIAGNOSTICS – Posible Error messages displayed in the program.
EXAMPLE – Example Usage of the command
BUGS and AUTHOR section – used only by brave developers
SEE ALSO – Lists related man-pages and additional documentation.
Man Sections:-
- – User commands – ls, bash
- – Library functions related to system Calls – syscall, pipe
- – Other Library Functions – perror, strerror, errno (libc calls)
- – Special Files or Devices – null, mem
- – File Formats – aliases, man.config
- – Games –
- – Conventions and explanations – boot, bootparam
- – Administration and privileged commands – mkfs, ifconfig
- – Kernel
- L – Math library functions
- N – tcl functions
Info :- Not all commands have info. Info has more description and don’t cover all the options for a command. Use info and man together to understand a command completely
/usr/share/doc – Documentation that comes with individual packages. It has FAQ and other details like README, LICENSE
/usr/share/doc/howto/en – Sometimes howtos will be missing. It is the TLDP howtos in most cases.
TLDP :– The Linux Documentation Project – Has documentation on all topics about Linux, you will ever mess with !!