Command Line Tools

You can use command help options to get more details. During the RHCE exam no internet access is available. But you can use local resources available in RHEL. During the exam whenever you have doubt about the options used with command take help.

command itself

Run command itself without supplying any required options or arguments. For example we do not know the correct syntax of grep command. In this case we should run grep command by itself. It would give us hint about the correct syntax of grep command.

grep

--help option

Running command by itself does not work for several commands. Like running cp command would not give us any information about command syntax or options.

cp

Use --help option with command to get available help.

cp with help option

info

Most of commands in RHEL have info manual. You should take help from info manual whenever it is available. info manual gives you detail about the associated options with short description. Syntax for info command is

#info [command]

info

man command

--help option list only most frequently used options. To list all available options with their details use man page. Linux commands are documented in a format known as the man page. man command list the options and settings associated with command. To use man command use following syntax

$man [command ]

For example to get help about ls command

$man ls

man ls

During the exam sometime you may need help about any service or configuration value but do not know which man page is associated with that service. In such a situation use you can use whatis and apropos command. For example we want to know information about ntfs but do not know which man page has documentation about ntfs. Run apropos command to list all man pages which have nfts in their description.

#apropos nfts

apropos

In same way to list all man page which has ls in their title run following command

#whatis ls

whatis

Difference between whatis and apropos is that whatis look in title of man page while apropos search in description.

During the exam

Both whatis and apropos command depends on a database in the /var/cache/man directory. So if you have installed any RPM during the exam these commands would not be for that. Fortunately you can update the database at any time by running following command

# /etc/cron.daily/makewhatis.cron

Documentation directory

Path of documentation directory is /usr/share/doc. Documentation directory may include sample configuration files. So it is a better idea to check them as well. For example sudo-*/ directory contain following sample configuration files.

  • sample.syslog.conf
  • sample.pam
  • sample.sudoers

document root