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 by Per C.

quizTest Your Knowledge

Which of the following statements about a null character is true?

A
It always has the same value as FALSE.
0%
B
As an integer, it is represented as -1.
0%
C
It can be entered by pressing the Esc key.
0%
D
All of its bits are set to zero.
0%
Correct! Incorrect!     View the Null Character definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Inode on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please 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 this definition or would like to suggest a new technical term, please contact us.

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.