The first, and most useful, thing to learn on the journey to the RHCSA is the man command.
Almost every command-line tool in Linux has easily accessible documentation. These documents are known as man pages and they are accessed using the
Once you've learned how to use
man , then you can find the commands needed to do most of the things that you would want to do in Linux.
At its most basic usage, when you already know which command you want to see the documentation of, the syntax is:
Man pages are divided into many sections:
- 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
- Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
- System administration commands (usually only for root)
- Kernel routines
The same entry name can be found in many sections. It can be helpful to specify the section number.
man [section-name] [command/tool name]
man 3 printf
If you're not getting the results you expect when looking up a command using
man, you can use the command line option 'f' to list all man pages that match the name in the input.
man -f printf
Or, you can also view all man pages for a given input one by one using the 'a' command-line option. The man pages will display in order of the section that they appear in.
man -a printf
If you're not sure what the command that you want is, you can try using the search command line option 'k'. This will search the command name and short description for the text or regular expression used.
man -k printf
There are many more command-line options that can be used with
man, but these are some of the most useful. These commands should enable you to find help for almost most things that you want to do.