Which of the following commands would you use to check disk usage in Linux?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command used to check disk usage in Linux is "df," which stands for disk free. This command provides a summary of the available and used disk space on all mounted filesystems. By default, it displays the total size, used space, available space, and the mounted point for each filesystem. It is useful for getting a quick overview of how much disk space is being utilized and how much is still available on your system.

While "du" is also a command related to disk usage, it serves a different purpose. It is primarily used to estimate file and directory space usage. This means it reports the disk space used by a specific file or directory, rather than providing an overview of the entire filesystem as "df" does.

The "ls" command is intended for listing files in a directory, while "top" is a task manager that displays running processes and their resource usage, which does not specifically focus on disk usage. Hence, the most appropriate command for checking overall disk usage in a Linux environment is "df."

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy