Quiz: Basic Shell Commands and Help Systems
Test your understanding of finding help and using fundamental shell commands.
1. What command displays the manual page for a Linux command?
- help
- info
- man
- docs
Show Answer
The correct answer is C. The man command displays the manual page for any command. For example, man ls shows the complete documentation for the ls command, including all options, examples, and related commands.
Concept Tested: Man Pages
2. What does the apropos command do?
- Displays disk usage
- Searches man page descriptions for a keyword
- Shows running processes
- Lists directory contents
Show Answer
The correct answer is B. The apropos command searches man page descriptions for a keyword. For example, apropos copy finds all commands related to copying. It's incredibly useful when you know what you want to do but don't know the command name.
Concept Tested: Apropos Command
3. What is the difference between man and --help?
- They show identical information
manshows full documentation;--helpshows a brief summary--helpshows full documentation;manshows a brief summary- Neither provides useful information
Show Answer
The correct answer is B. The man command displays comprehensive documentation including detailed descriptions, all options, and examples. The --help flag (used like ls --help) shows a brief summary of the most common options—quick and convenient for a refresher.
Concept Tested: Man Pages, Help Command
4. What does the echo command do?
- Creates a new file
- Displays text or variable values to the screen
- Searches for text in files
- Copies files to another location
Show Answer
The correct answer is B. The echo command displays text or variable values to the terminal (stdout). For example, echo "Hello" prints "Hello", and echo $HOME prints your home directory path. It's commonly used in scripts and for checking variable values.
Concept Tested: Echo Command
5. What command shows the current date and time?
- time
- now
- date
- clock
Show Answer
The correct answer is C. The date command displays the current date and time. It can also be customized with format strings (like date +"%Y-%m-%d" for ISO format) and is commonly used in scripts for timestamps and log files.
Concept Tested: Date Command
6. What does the whatis command provide?
- A full manual page
- A one-line description of a command
- System hardware information
- User account details
Show Answer
The correct answer is B. The whatis command displays a one-line description of what a command does. For example, whatis grep returns "grep - print lines that match patterns." It's perfect for quick reminders without opening the full man page.
Concept Tested: Whatis Command
7. What does uname -a display?
- User account information
- USB devices connected
- Complete system information (kernel, architecture, etc.)
- Network configuration
Show Answer
The correct answer is C. The uname -a command displays all system information including kernel name, hostname, kernel version, machine architecture, processor type, and operating system. The -a flag means "all information."
Concept Tested: Uname Command, Version Information
8. What does the whoami command output?
- Your computer's IP address
- Your current username
- Your password
- Your home directory path
Show Answer
The correct answer is B. The whoami command outputs your current username. It's useful in scripts or when you're unsure which user account you're logged in as, especially after using su or sudo to switch users.
Concept Tested: Whoami Command
9. What does the cal command display?
- Calculator application
- Calorie counter
- Calendar for the current month
- Call history
Show Answer
The correct answer is C. The cal command displays a calendar for the current month with today's date highlighted. You can also view other months (cal 12 2025) or the entire year (cal 2025). It's a quick way to check dates without leaving the terminal.
Concept Tested: Cal Command
10. What does uptime tell you?
- How long until your subscription expires
- How long the system has been running since last boot
- The current time only
- How long until the next update
Show Answer
The correct answer is B. The uptime command shows how long the system has been running since the last boot, along with the current time, number of logged-in users, and system load averages. System administrators use this to monitor server stability.
Concept Tested: Uptime Command