150 likes | 462 Views
isecur1ty training center Presented by : Eng. Mohammad Khreesha . Linux Essentials. Table of contents. Introduction Getting help in Linux m an pages a propos (man –k) w hatis whereis man sections -h option info. Introduction.
E N D
isecur1ty training center Presented by : Eng. Mohammad Khreesha Linux Essentials
Table of contents • Introduction • Getting help in Linux • man pages • apropos (man –k) • whatis • whereis • man sections • -h option • info
Introduction • 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.
Linux command structure • 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 )
Getting help in Linux • 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…
man pages • 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
apropos (man –k) • 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
whatis (man –f) • 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 • whereisused to locate the binary, source, and manual page files for a command… • Examples: • whereis tar
man sections • 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
continue… • Examples : • man passwd : opens the first manual found • man 5 passwd : opens a page from section 5
man man • 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
-h option or --help • 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
info • 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