3 ms·
If your disk is mounted at root ("/"), which is the case of most default distro installs, you can run "df -h /" to get only your disk info: user@hostname:~
by bheadmaster 2y ago
If your disk is mounted at root ("/"), which is the case of most default distro installs, you can run "df -h /" to get only your disk info:
user@hostname:~$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sdc 1007G 49G 908G 6% /
- badsectoracula 2y agoThis only shows a single disk. I find it weird that despite having a bunch of options to control output and even filter things, df does not have an option to specify "show me only physical block devices and only once (my /dev/sda4 shows up for various mountpoints but still all show the same size/used/avail values)".
- bheadmaster 2y agoIn that case, you can use "-t ext4" (or whatever filesystem type you use) to show only disks formatted with this filesystem type. On my machine, none of the snap/tmpfs/efivars stuff shows up: user@hostname:~$ df -ht ext4 Filesystem Size Used Avail Use% Mounted on /dev/sdc 1007G 49G 908G 6% /