isecur1ty training center Presented by : Eng. Mohammad Khreesha
Introduction Getting help in Linux man pages apropos (man –k) whatis whereis man sections -h option info
The command line is the tool that all GUI applications use to do their work. In other words: graphical tools are merely front-ends to command line tools.
The basic Linux command works like this: command [OPTIONS] [ARGUMENTS ] ▪ command: This is the base of the command. ▪ OPTIONS: Options are those pieces of the command that alter the behavior of the command. ▪ ARGUMENTS: Arguments are typically file names or other data that is needed by the command. ▪ Example: mkdir -m 654 TEST (create the directory TEST with the mode 654 )
This module will guide you to the correct way for getting help in Linux without searching on internet …. We will discuss multiple ways to get help in linux…
The man pages are a user manual that is by default built into most Linux distributions (i.e., versions) and most other Unix-like operating systems during installation. They provide extensive documentation about commands and other aspects of the system, including configuration files, system calls, library routines and the kernel ….. Examples: man whois man syslog.conf man syslogd
The apropos command displays a list of all topics in the man pages that are related to the subject of a query. Examples: man -k syslog or apropos syslog
The whatis command provides very brief descriptions of command line programs and other topics related to Linux and other Unix- like operating systems. Examples: whatis cat or man –f cat
whereis used to locate the binary, source, and manual page files for a command… Examples: whereis tar
The manual is generally split into eight numbered sections, organized as follows : Executable programs or shell commands System calls (functions provided by the kernel) Library calls (functions within program libraries) Special files (usually found in /dev) File formats and conventions eg /etc/passwd Games Miscellaneous (including macro packages and conventions), e.g. man(7) System administration commands
Examples : man passwd : opens the first manual found man 5 passwd : opens a page from section 5
If you want to know more and more about man pages you can get help about man (manual) pages like this : man man Note : man pages don’t have answers for everything like : man hello
Sometimes you may know the functionality of a command very well, but cannot recollect all the available options for a specific command. Use -h option of the command to review all available options of the command. Examples : ▪ cat –help ▪ netstat -h
Display a file’s help information in an alternate format. Some programs don’t have man pages – or have very incomplete man pages – and store their documentation as info documents. Examples: info cat
The end