Get Help: Use Shell Help Tools to Answer Questions About Commands
The laborant user needs to demonstrate proficiency with shell help tools on rocky-01.
Complete the following three tasks on rocky-01.
Task 1: Run whatis passwd and save its output to /home/laborant/whatis-passwd.txt.
Task 2: Run type cd and save its output to /home/laborant/type-cd.txt.
Task 3: Rebuild the man page database so that whatis ls returns a description containing the word "list".
Hint 1 — Saving command output to a file
The shell's redirection operator > writes standard output to a file. For example: somecommand > ~/output.txt
Hint 2 — Finding what type of thing a command is
The type built-in tells you whether a name resolves to a shell builtin, an alias, a function, or an external file on disk.
Hint 3 — Fixing a broken whatis database
whatis reads from an indexed database. If it returns "nothing appropriate", the database is stale or missing. There is a command specifically for rebuilding this database — check its man page or try apropos mandb.
Hint 4 — Rebuilding the man page database
The command mandb regenerates the whatis database. You will need elevated privileges to run it: sudo mandb