• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / df Command In Linux With Options & Examples

df Command In Linux With Options & Examples

By Sourabh / May 9, 2020 Category: How To, Ubuntu

Check disk space in Linux Ubuntu. Examples of df command to report file system disk space usage. The “df” command is for “disk filesystem” and is a great tool to know about the disk space usage on Linux Systems. The df command displays the amount of disk space available on the file system.

If no file name is given, the space available on all currently mounted file systems is shown. Disk space is shown in 1K blocks by default, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.

If an argument is the absolute file name of a disk device node containing a mounted file system, df shows the space available on that file system rather than on the file system containing the device node (which is always the root file system).

Example-1:

The simplest df command is by itself. Without any command parameters. When executed the df command displays the information about the file system disk space usage. It shows the device name, total blocks, total disk space, used disk space, free disk space and mount points.
df

Example-2:

Using the df command with -a or –all it shows dummy file systems information along with all the basic file system disk usage info:
df -a

Example-3:

As the disk space is shown in 1K blocks by default, users can use “-h” command parameter to show the file system disk space usage data in “human readable” format.
df -h

Example-4:

Use the command parameters -hT to display the info about the /home file system:
df -hT /home

Example-5:

Use the command argument -k to display all file system information in 1024-byte blocks:
df -k

Example-6:

Similarly you can use the command argument -m to display all file system information in MB (Mega Byte) and -h to see the info in GB (Gigabyte):
df -m
df -h

Example-7:

If you wish to see the disk space usage info of a certain file system type, use it as argument:
df -t ext3

Similarly there are many more command arguments that can be used to see the desired info. These arguments can be use alone of in combination. Below are the arguments supported by df command:

-a, –all include dummy file systems
B, –block-size=SIZE use SIZE-byte blocks
–direct show statistics for a file instead of mount point
–total produce a grand total
-h, –human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, –si likewise, but use powers of 1000 not 1024/p>
-i, –inodes list inode information instead of block usage/td>
-k like –block-size=1K
-l, –local limit listing to local file systemsp
–no-sync do not invoke sync before getting usage info (default)
-P, –portability use the POSIX output format
–sync invoke sync before getting usage info
-t, –type=TYPE limit listing to file systems of type TYPE
-T, –print-type print file system type
–x, –exclude-type=TYPE limit listing to file systems not of type TYPE
-v (ignored)
–help display this help and exit
–version output version information and exit

Tags: Check Disk Space In Linux, Check Disk Space In Ubuntu, Check Disk Space in Unix, Check Free Disk Space In Linux, Check Free Disk Space In Ubuntu, Check Free Disk Space in Unix, df Command in Linux, df Command in Ubuntu, df Command in Unix, df Command Linux Example, df Command Linux Options, df Command Ubuntu Example, df Command Ubuntu Options, df Command Unix Example, df Command Unix Options, Example df Command Linux, Example df Command Ubuntu, Example df Command Unix, Find Disk Space In Linux, Find Disk Space in Ubuntu, Find Disk Space in Unix, Find Free Disk Space in Linux, Find Free Disk Space in Ubuntu, Find Free Disk Space in Unix, Show Disk Space in Linux, Show Disk Space in Ubuntu, Show Free Disk Space in Linux, Show Free Disk Space in Ubuntu, Use df Command in Linux, Use df Command in Ubuntu, Use df Command in Unix, Using df Command in Linux, Using df Command in Ubuntu, Using df Command in Unix

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap