What command is used to display disk usage in Linux?

Prepare for the LPI Linux Essentials 010-160 Test. Study with flashcards and multiple choice questions, each question offers hints and explanations. Get ready to ace your exam!

The command to display disk usage in Linux is "du." This command stands for "disk usage" and is specifically designed to summarize the amount of disk space used by files and directories. When used without any options, "du" will provide the size of each directory, including its subdirectories, in the current directory.

For example, running "du -h" will list the sizes in a human-readable format (e.g., KB, MB), offering clear insight into how much disk space is being utilized. This makes "du" invaluable for users who need to analyze and manage their disk space effectively.

While other commands like "df" also play a role in understanding disk usage, they primarily provide information about disk space availability on mounted filesystems rather than breaking down the usage per directory or file. Thus, "du" is the correct command to directly analyze disk usage at a more granular level.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy