On a Linux ext4 file system, where is a file's name stored?

In the directory entry, not in the file's inode.

Start playing free

  1. In the file's inode
  2. In the directory entry ✔
  3. In the first block of the file

Why: An inode holds a file's metadata, like size, owner, time stamps and where its blocks are. The name lives in the directory, which maps names to inode numbers. That is how one file can have several names through hard links.

Huh, didn't know that: An ext4 directory entry stores a copy of the file type to make directory lookups faster.

The dad joke
Why did the inode have an identity crisis? It knew everything about the file except its name.
Like this card?
Play the game

References

Answer: In the directory entry. An inode holds a file's metadata, like size, owner, time stamps and where its blocks are. The name lives in the directory, which maps names to inode numbers. That is how one file can have several names through hard links.

  1. Linux kernel docs: ext4 Index Nodes docs.kernel.org/filesystems/ext4/inodes.html
    the inode stores all the metadata pertaining to the file (time stamps, block maps, extended attributes, etc), not the directory entry
    Checked 2026-10-10.
  2. OpenStax Introduction to Computer Science 6.5: File Systems openstax.org/books/introduction-computer-science/pages/6-5-file-systems
    An inode contains metadata about a file or directory but not its name.
    Checked 2026-10-10.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game