A Linux administrator needs to check the disk space usage for all mounted filesystems. The output must be displayed in a human-readable format (e.g., KB, MB, GB) to be easily understood. Which of the following commands will accomplish this task?
The correct command is df -h. The df (disk free) command reports the system's disk space usage for all mounted filesystems. The -h option presents the sizes in a human-readable format (e.g., 1K, 234M, 2G), making the output easy to interpret.
du -h / is incorrect because the du (disk usage) command estimates the space consumed by files and directories, not the overall filesystem usage. Running it on the root directory (/) can be a very slow and resource-intensive process.
lsblk -h is incorrect because while lsblk lists block devices, it does not have a -h option for human-readable sizes in the same way as df or du, nor does it primarily report on used and available space percentages.
free -h is incorrect because the free command is used to display information about system memory (RAM and swap), not disk storage.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the primary function of the df command in Linux?
Open an interactive chat with Bash
What is the difference between df and du commands in Linux?
Open an interactive chat with Bash
What other information can be retrieved using the lsblk command?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access