Inode

An inode (short for "index node") is a data structure Linux uses to store information about a file. Each inode has a unique ID that identifies an individual file or other object in the Linux file system.

Inodes contain the following information:

  • File type - file, folder, executable program etc.
  • File size
  • Time stamp - creation, access, modification times
  • File permissions - read, write, execute
  • Access control list - permissions for special users/groups
  • File protection flags
  • File location - directory path where the file is stored
  • Link count - number of hardlinks to the inode
  • Additional file metadata
  • File pointers - addresses of the storage blocks that store the file contents

Notably, an inode does not contain the filename or the actual data. When a file is created in the Linux file system, it is assigned an inode number and a filename. This linked pair allows the filename to be changed without affecting the file ID in the system. The same holds true when renaming directories, which are treated as files in Linux.

File data is stored across one or more blocks on the storage device. An inode includes a pointer to this data but does not contain the actual data. Therefore, all inodes are relatively small, regardless of the size of the files they identify.

Modern file systems provide a hierarchical directory structure (folders) to make it easier to organize files. However, in Linux, files are not actually stored in directories. Instead, directories only contain filenames and their associated inode IDs. The ID references an inode in the Linux inode table, which points to the storage blocks where the file data is stored.

NOTE: Each Linux storage device has an inode limit, which is defined when the disk is formatted. In rare cases, when many small files are created, the inode limit may be reached before the full storage capacity has been used.

Updated December 20, 2019

Definitions by TechTerms.com

The definition of Inode on this page is an original TechTerms.com definition. If you would like to reference this page or cite this definition, you can use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about the Inode definition or would like to suggest a new technical term, please contact us.

Want to learn more tech terms? Subscribe to the daily or weekly newsletter and get featured terms and quizzes delivered to your inbox.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.