How to use the SSH df command

Learning how to use the SSH df command is one of the most useful Linux skills for anyone managing a server. The df command shows how much disk space is used and available on your file systems, so you can spot a full disk before it causes problems. In this article, we will show you how to use the SSH df command with clear, practical examples.

How to use the SSH df command

In short, df (disk free) reports disk usage for every mounted file system. To get started, connect to your account over SSH, then run the examples below to check your available space.

Basic df usage

First, run the command on its own to list all file systems and their usage in blocks:

df

Show sizes in a human-readable format

Next, add the -h flag to display sizes in KB, MB, and GB instead of raw blocks. This is the option most people use every day:

df -h

Check a specific file system

Additionally, you can point df at a single path to see usage for just that mount:

df -h /home
df -h .

Display inode usage

Finally, use the -i flag to show inodes instead of space. This is useful when a disk reports free space but still refuses new files, because it has run out of inodes:

df -i

You can also add the -T flag to show each file system’s type, for example df -hT, which helps when a server has several kinds of storage. Because these commands only read information, they are completely safe to run at any time, making df a quick first step when you troubleshoot storage issues.

Need more help?

Master the basic Linux commands with examples on a SSH shared hosting account, or get full root control with a JetHost VPS. Both include free SSH access and full Linux terminal support, so you can run the SSH df command directly on your server today.