Blog

Chapter 6 Getting help in Linux!

Tags: aproposcommand helphelphelp in linuxinfomakewhatismantldpwhat is whatiswhatis

Published on: May 14, 2009 by Faheem P.

Chapter 6 Getting help in Linux!

Scenario:

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:-

  1. – User commands – ls, bash
  2. – Library functions related to system Calls – syscall, pipe
  3. – Other Library Functions – perror, strerror, errno (libc calls)
  4. – Special Files or Devices – null, mem
  5. – File Formats – aliases, man.config
  6. – Games –
  7. – Conventions and explanations – boot, bootparam
  8. – Administration and privileged commands – mkfs, ifconfig
  9. – Kernel
  10. L – Math library functions
  11. 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 !!

Category : General, Howtos, Linux, Training

Faheem P.

Faheem P.

Faheem enjoys learning new technologies and loves to implement cutting edge solutions. He is one of the most active member in various technical forums and is a familiar face in various brain storming sessions. He takes great pride in being an explorer and the best thing you can be sure about in his room is the backpack!!

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items