Shell Help and Command Discovery
Two objectives in one guide: issuing commands with correct syntax, and locating documentation in man, info and /usr/share/doc. The second is worth more than it looks - with no internet, being fast in `man` is the difference between recalling an option and losing four minutes to it.
Essential Tools Guide 4 of 67 Beginner
- OSRHEL 10.0 (Coughlan)
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 13 min
- Reviewed23 August 2026
Written against the versions above. `man -k` and `apropos` are the same program. Both search a pre-built index of one-line descriptions, which is why the results below are so much narrower than people expect - and why `man -K`, capital K, exists.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 (Coughlan) | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
Before you start
- A RHEL 10 machine and a shell on it.
- Nothing here modifies the system.
-
The machine this guide assumes
Every command in this guide was run on RHCSA-A01, a Red Hat Enterprise Linux 10.0 machine in the state below. Three things about it are worth reading before anything else, because they are the difference between a command working and a command failing for reasons that have nothing to do with what is being taught.
sysadminis in thewheelgroup, sosudoworks. The exam gives you root or a sudo-capable account; this path usessudoexplicitly on every command that needs it rather than assuming a root shell, so you can see exactly which ones do.SELinux is
Enforcingand firewalld is running. Both are on by default in RHEL and both are examined, so neither is ever switched off here to make an example work. When something is blocked by one of them, that is the lesson rather than an obstacle to it.bash Example session cat /etc/redhat-release; uname -rRed Hat Enterprise Linux release 10.0 (Coughlan)6.12.0-55.9.1.el10_0.x86_64id; sudo -n true && echo "sudo: works without a password prompt"uid=1000(sysadmin) gid=1000(sysadmin) groups=1000(sysadmin),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023sudo: works without a password promptgetenforce; sestatus | grep -E "SELinux status|Current mode|Loaded policy"EnforcingSELinux status: enabledLoaded policy name: targetedCurrent mode: enforcingExpected resultRHEL 10.0, a sudo-capable account, and SELinux enforcing.
Success conditionYour machine matches the one every command in this guide was run on.
-
What you are typing into
/bin/bash bash GNU bash, version 5.2.26(1)-release (x86_64-redhat-linux-gnu)Bash, which is what RHEL gives you and what the exam gives you. Worth confirming rather than assuming - the machines these captures ran on were originally set to
zsh, and that changes enough to matter.The more useful habit is
type, which answers *what will actually run*:cd is a shell builtin ls is /usr/bin/ls echo is a shell builtin echo is /usr/bin/echoThree names, three different kinds of thing.
cdis a builtin - there is no/usr/bin/cd, which is why it cannot be run undersudoorfind -exec.echois both a builtin and a binary, andtype -ashows the builtin listed first because that is the one that wins.That last one is a real source of confusion:
man echodocuments the binary, while what you ran was the builtin, and their options differ. When a man page seems to describe a different command from the one you are using,typeis why - and for a builtin the right reference ishelp echo.One thing to read carefully:
lsis/usr/bin/lshere, not an alias. Interactively RHEL aliases it tols --color=autofrom/etc/profile.d, but this command ran non-interactively over ssh, where those files are not sourced. That is exactly why a command can behave one way at your prompt and another way inside a script or a cron job - the aliases and functions simply are not there.bash Example session echo $SHELL; echo $0; bash --version | head -1/bin/bashbashGNU bash, version 5.2.26(1)-release (x86_64-redhat-linux-gnu)type cd; type ls; type -a echocd is a shell builtinls is /usr/bin/lsecho is a shell builtinecho is /usr/bin/echocommand -v systemctl; which systemctl/usr/bin/systemctl/usr/bin/systemctlExpected resultBash, and three names resolving to three different kinds of thing.
Success conditionYou can tell a builtin from a binary from an alias.
-
Manual sections, and why passwd has two pages
passwd (1) - update user's authentication tokens passwd (5) - password fileThe same name in two sections. Section 1 is the command you run; section 5 is the file format.
man passwdgives you the lowest-numbered match, which is the command - so if you wanted the layout of/etc/passwd, the default is the wrong page and it will not tell you so.man 5 passwdThe sections worth knowing for EX200: 1 user commands, 5 file formats, 8 administration commands.
crontabis the other one that catches people -man 1 crontabis the command,man 5 crontabis the syntax of the file, and the file syntax is what the exam task needs.bash Example session man -f passwd 2>&1 | head -5passwd (1) - change user passwordpasswd (1ossl) - OpenSSL application commandspasswd (5) - password fileman 1 passwd | head -12PASSWD(1) User Commands PASSWD(1) NAME passwd - change user password SYNOPSIS passwd [options] [LOGIN] DESCRIPTION The passwd command changes passwords for user accounts. A normal user may only change the password for their own account, while the superuserman 5 passwd | head -14passwd(5) File Formats Manual passwd(5) NAME passwd - password file DESCRIPTION The /etc/passwd file is a text file that describes user login accounts for the system. It should have read permission allowed for all users (many utilities, like ls(1) use it to map user IDs to usernames), but write access only for the superuser. In the good old days there was no great problem with this general read permission. Everybody could read the encrypted passwords, but theExpected resultTwo different pages for one name.
Success conditionYou will reach for
man 5when you need a file format. -
Searching when you do not know the command's name
This is where it gets interesting. Ask for the tool that manages password aging:
boltd (8) - thunderbolt device managing system daemon daemon (7) - Writing and packaging system daemons git-stage (1) - Add file contents to the staging area gnome-extensions (1) - Command line tool for managing GNOME extensionsNot one of those is related.
man -kmatched the lettersaginginside managing, packaging and staging. And the command it should have found is missing:chage (1) - change user password expiry informationchageis exactly the right answer, andman -k agingcannot find it - becauseman -ksearches only the one-line description, and that line says *expiry*, not *aging*. Two failures at once: noise from substring matches, and a miss on the word the objective itself uses.The fallback is capital
-K, which searches the full text of every page:LOGIN(1) User CommandsIt finds pages containing the phrase - here
login(1)first, notchage- and it is slow enough that you would not use it casually. Search for the word the documentation would use, not the word the task uses:man -k password,man -k expiry,man -k shadow.bash Example session man -k aging 2>&1 | head -5boltd (8) - thunderbolt device managing system daemondaemon (7) - Writing and packaging system daemonsgit-stage (1) - Add file contents to the staging areagnome-extensions (1) - Command line tool for managing GNOME extensionsscalar (1) - A tool for managing large Git repositoriesman -k chage 2>&1 | head -2; whatis chagechage (1) - change user password expiry informationchage (1) - change user password expiry informationtimeout 60 man -K "password aging" 2>&1 | head -4LOGIN(1) User Commands LOGIN(1) NAME login - begin session on the systemapropos umask 2>&1 | head -4pam_umask (8) - PAM module to set the file mode creation maskumask (1) - bash built-in commands, see bash(1)umask (2) - set file mode creation maskExpected resultIrrelevant substring matches, and the right command found only by its own name.
Success conditionYou know what
man -kdoes and does not search. -
The two sources that are not man pages
chrony coreutils curl dnf .../usr/share/doccarries what man pages leave out: full example configurations. For a task like configuring chrony, the shipped example is more useful than the man page, andrpm -qdlists exactly what a package installed:rpm -qd chronyThat is the trick worth keeping. Given a package name,
rpm -qdtells you every document it shipped - man pages and/usr/share/docalike - without guessing at paths.infois the third source. GNU tools document themselves there in more depth than in their man page;info coreutils 'ls invocation'is the canonical example. It is worth knowing exists, and in a timed exammanis almost always faster.One more, not shown: many commands answer
--helpmore usefully than either, and it costs nothing to try first.bash Example session ls /usr/share/doc | head -12accountsserviceadcliadobe-mappings-cmapadobe-mappings-pdfalsa-libalsa-utilsappstreamatat-spi2-coreattrauditauthselectls /usr/share/doc/chrony/ 2>/dev/null; rpm -qd chrony 2>/dev/null | head -5chrony.keys.exampleFAQNEWSREADME/usr/share/doc/chrony/FAQ/usr/share/doc/chrony/NEWS/usr/share/doc/chrony/README/usr/share/doc/chrony/chrony.keys.example/usr/share/man/man1/chronyc.1.gzinfo coreutils 'ls invocation' 2>/dev/null | head -10 || echo "info not installed"Expected resultPackage documentation directories, and the files chrony shipped.
Success conditionYou can find a worked example on a machine with no internet.
Troubleshooting
man -kreturns "nothing appropriate".Why: The index has not been built, or the word is not in any description.
Fix:
sudo mandbbuilds it. If that does not help, search a different word - the index only holds one-line summaries.manshows the command when you wanted the file format.Why: It returns the lowest-numbered section.
Fix:
man 5 <name>. Useman -f <name>to list every section that has a page.The man page describes options your command rejects.
Why: You are running a shell builtin, not the binary the page documents.
Fix:
type -a <name>. For builtins,help <name>.