Quiz: Storage Devices and System Performance
Test your understanding of disk management and performance monitoring.
1. What does df -h show?
- Directory files
- Disk space usage in human-readable format
- Default files
- Disk formatting options
Show Answer
The correct answer is B. df (disk free) shows disk space usage for all mounted filesystems. The -h flag displays sizes in human-readable format (GB, MB) instead of raw bytes.
Concept Tested: Df Command
2. What does du -sh * show?
- Disk usage for all items in current directory, summarized
- Download updates
- Directory users
- Disk unmount status
Show Answer
The correct answer is A. du (disk usage) shows how much space files/directories use. -s summarizes (one line per argument), -h is human-readable, and * matches all items in the current directory.
Concept Tested: Du Command
3. What is mounting a filesystem?
- Physically installing a hard drive
- Making a filesystem accessible at a point in the directory tree
- Encrypting a drive
- Formatting a drive
Show Answer
The correct answer is B. Mounting attaches a filesystem (from a drive, partition, or remote location) to a mount point in the directory tree, making its contents accessible. For example, USB drives are often mounted at /media/.
Concept Tested: Mounting Filesystems
4. What command lists all block devices (disks and partitions)?
- ls /dev
- lsblk
- fdisk -l
- mount
Show Answer
The correct answer is B. lsblk (list block devices) shows all storage devices and their partitions in a tree format, including size, type, and mount points. It's cleaner than parsing /dev or fdisk output.
Concept Tested: Lsblk Command
5. What does free -h display?
- Available disk space
- Memory (RAM) usage in human-readable format
- Free software licenses
- Network bandwidth
Show Answer
The correct answer is B. free shows memory (RAM) and swap usage. -h makes it human-readable. It displays total, used, free, shared, cache/buffers, and available memory.
Concept Tested: Free Command
6. What is swap space?
- Extra SSD storage
- Disk space used as overflow when RAM is full
- A backup partition
- Temporary file storage
Show Answer
The correct answer is B. Swap space is disk space used when physical RAM is exhausted. The kernel moves inactive memory pages to swap, freeing RAM for active processes. It's slower than RAM but prevents out-of-memory crashes.
Concept Tested: Swap Space
See: Chapter 18 - Swap
7. What does the mount command show when run without arguments?
- Nothing
- All currently mounted filesystems
- Available disk space
- Mount point directories
Show Answer
The correct answer is B. Running mount without arguments displays all currently mounted filesystems, their mount points, filesystem types, and mount options. Useful for seeing what's mounted and where.
Concept Tested: Mount Command
8. How do you safely remove a USB drive?
- Just unplug it
- Unmount it first with umount, then remove
- Delete its files first
- Restart the computer
Show Answer
The correct answer is B. Always unmount a drive before physically removing it using umount /mount/point or umount /dev/sdX. This ensures all cached writes are completed, preventing data corruption.
Concept Tested: Umount Command
9. What does htop provide over the standard top command?
- They're identical
- A more visual, colorful interface with mouse support
- Less information
- Network monitoring
Show Answer
The correct answer is B. htop is an enhanced version of top with a colorful interface, visual CPU/memory meters, mouse support, and easier process management. It's not installed by default but is worth installing.
Concept Tested: Htop Command
See: Chapter 18 - Htop
10. What does /etc/fstab contain?
- File system attributes
- Filesystem mount configuration for boot time
- Fast tab completion settings
- Firewall rules
Show Answer
The correct answer is B. /etc/fstab (filesystem table) defines which filesystems to mount automatically at boot time, their mount points, types, and options. Editing this file is necessary for persistent mount configurations.
Concept Tested: Fstab Configuration
See: Chapter 18 - Fstab