A lot of that information is already on your machine.
This is especially useful when preparing for a practical exam like the RHCSA. You might know exactly what you need to accomplish but forget the option or configuration syntax. Knowing how to find that information can get you moving again.
Here’s how I usually approach it.
Start with the quick help
If I need to check an option or remind myself how a command works, I usually start with:
command --help
Many commands also accept -h, but check before assuming. Some use it for something else. With ls, for example, -hmakes file sizes human-readable.
Try:
mkdir --help
You get a short explanation of the command, its options, and how to use them. Sometimes that’s all you need.
For Bash built-in commands, such as read or umask, use help:
help read help umask
These commands are part of the shell itself, so the shell has documentation for them.
Open the man page when you need more
When the quick help doesn’t give me enough detail, I open the manual:
man command
Let’s say you need to create a user account with a specific home directory and login shell:
man useradd
You don’t need to read every option. You already know what you’re looking for: something about the home directory and something about the shell.
In the usual pager, type /home to search for “home.” Press n to move to the next match. You can do the same with /shell. Press q when you’re done.
This is where man pages become practical. You have a task, and you’re using the documentation to work out the exact command.
Configuration files have man pages too
This is something I wish more beginners knew.
Man pages also document configuration files: what each field means, which values are accepted, and how entries should be written.
For example:
man fstab man sshd_config
Imagine you’re configuring a persistent filesystem mount and can’t remember the order of the fields in /etc/fstab. Open man fstab. The format is documented there.
Or you’re changing an SSH setting and want to understand what it actually does. Search for that setting in man sshd_config.
That’s useful during everyday administration, and it’s a useful habit to develop while practising for the RHCSA. When you forget syntax, get comfortable looking it up locally.
Look for examples and related pages
Some man pages include an EXAMPLES section. Always worth checking. An example can make a complicated description click immediately.
Also look at SEE ALSO near the bottom. It points you toward related commands and configuration files, which helps when you’ve found something close to what you need but haven’t quite reached the answer.
Another place to look is:
info command
Where an Info manual is installed, it can provide a longer explanation, with sections you can navigate through. Try info coreutils for the GNU core utilities.
You won’t need all these sources every time. Start with the quick help, then go deeper when you need to.
The more you practise this, the less pressure you feel to remember every flag and every configuration field. You still need to understand what you’re doing. But the exact syntax? Very often, Linux already has it written down for you.