How to check free disk space on FreeBSD server

Posted in Linux on April 22, 2017
Tags: , , ,

How can you check and display free disk space available on a FreeBSD server? The best way is using the command 'df -h' and here's exactly what I found from doing some research online. Just type “df” (df means disk free) which will show you the raw numbers or you can type “df -h” which means human readable and makes the output easier to read by displaying it in kilobytes, megabytes, and gigabytes instead of the default kilobytes.. I did this on one of my servers and here's what it will look like...

SSH commands for checking freebsd server disk space

Here's text from one server:

-bash-3.2$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md2             1888170872  83453524 1707256624   5% /
/dev/md0                101018     20914     74888  22% /boot
tmpfs                  4088788         0   4088788   0% /dev/shm
-bash-3.2$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md2              1.8T   80G  1.6T   5% /
/dev/md0               99M   21M   74M  22% /boot
tmpfs                 3.9G     0  3.9G   0% /dev/shm

Here's text from another server:

$ df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 128990 60892 57780 51% /
/dev/ad0s1f 257998 1440 235920 1% /tmp
/dev/ad0s1g 155014798 126948208 15665408 89% /usr
/dev/ad0s1e 257998 10454 226906 4% /var
procfs 4 4 0 100% /proc
/dev/ad3s1c 384602638 13645514 340188914 4% /usr/www/virtual/yyy/drive2
$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 126M 59M 56M 51% /
/dev/ad0s1f 252M 1.4M 230M 1% /tmp
/dev/ad0s1g 148G 121G 15G 89% /usr
/dev/ad0s1e 252M 10M 222M 4% /var
procfs 4.0K 4.0K 0B 100% /proc
/dev/ad3s1c 367G 13G 324G 4% /usr/www/virtual/yyy/drive2

If you want to know more about FeeBSD and server commands, I recommend this book: Absolute FreeBSD: The Complete Guide to FreeBSD

Leave a Reply

Your email address will not be published. Required fields are marked *