Online Linux Terminal Logo
OnlineLinuxTerminal
磁盘与存储CLI Manual

$df

Report file system disk space usage across mounted storage partitions.

命令语法POSIX Standard
df [OPTIONS] [FILE...]
Linux 社区2.4k 在线

与真实 Linux 用户交流,学习常用命令并免费获取精美速查表 PDF。

在交互式终端沙盒中实时运行

无需安装的客户端实时仿真环境。

在全屏终端工作区中打开 ↗
bash — terminal

概述与工作原理

`df` (Disk Free) analyzes mounted filesystems to display total disk capacity, used space, available free space, and mount points. It is the first command sysadmins run when encountering "No space left on device" errors.

常用参数与选项说明

Flag / OptionDescription
-h, --human-readablePrint sizes in human-readable powers of 1024 (e.g., 10G, 500M).
-T, --print-typeInclude filesystem type column (ext4, xfs, btrfs, tmpfs).
-i, --inodesDisplay inode usage statistics instead of block usage.

实际生产案例与代码范例

#1Check human-readable disk space

Displays disk usage for all mounted partitions with readable GB/MB units.