Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk2 min

Why Linux Seems to Lie About Files: Inodes Explained

Linux is not lying: filenames, inode metadata, hard links, and disk-block capacity describe different parts of a filesystem.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux is not contradicting itself: a filename, an inode, and the space a file uses are different things. A directory entry connects a name to an inode, which holds metadata; hard links let multiple names point to the same inode. Meanwhile, inode availability and free data-block space are separate filesystem limits.

What an inode represents—and what it does not

An inode is a filesystem object that holds metadata associated with a file. The Linux inode manual lists metadata such as the inode number, file type and mode, link count, owner and group, size, allocated blocks, and timestamps. Programs can inspect this information through interfaces such as stat and statx.

As an Amazon Associate I earn from qualifying purchases.

The inode is not the filename. On ext4, a directory entry maps a name to an inode number. The Linux kernel’s ext4 directory documentation describes a directory as a mapping from a byte string—usually a name—to an inode number. This is why the same underlying file can have more than one name.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why one file can have multiple names

A hard link is another directory entry that refers to the same inode. The inode’s link count records how many hard links refer to it. As the kernel’s ext4 directory documentation explains, “There can be many directory entries across the filesystem that reference the same inode number–these are known as hard links, and that is why hard links cannot reference files on other filesystems.”

That filesystem boundary matters: inode numbers are unique within a filesystem, not globally. The same number on two different mounted filesystems does not identify the same file, and a hard link cannot cross between those filesystems. The ext4 explanation describes ext4’s implementation; it should not be read as a claim that every Linux filesystem has the same on-disk layout.

Why inode numbers and disk space can look contradictory

Linux reports inode use separately from data-block use because they answer different questions. A filesystem can have available data space but no free inodes, or have free inodes while its data blocks are nearly full. A hard-link count is also distinct: it counts directory entries referencing an inode, not the blocks allocated to store file data.

Question What it describes Command
How much filesystem space is used or free? Data-block usage df -h
How many inodes are used or free? Inode usage df -i
What metadata does a particular path have? That path’s inode metadata stat path

GNU df documents -i (or --inodes) as displaying inode information instead of block usage. See the GNU df manual. Formatting and option availability can differ in other df implementations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to check what Linux is reporting

  1. Run df -h to inspect human-readable filesystem-space figures.

  2. Run df -i to inspect inode information for mounted filesystems.

  3. Run stat path to inspect metadata for a specific path, including its inode number, link count, size, and allocated blocks where reported.

df -i reports inode information at the filesystem level; it does not identify which directory contains the files using the inodes. Finding where a large population of files is concentrated requires a separate diagnostic.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to remember about filesystem differences

The stat interface provides a way to inspect inode metadata, but the documented ext4 directory structures are ext4-specific. Linux supports different filesystems, and their internal layouts need not match ext4’s. Treat an inode number as meaningful in the context of its filesystem, and choose df -h or df -i according to whether you are checking blocks or inodes.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.