What Is The Inode Number In Linux - Infinitive Host

What Is The Inode Number In Linux?

Index Node is known as INODE. It is the most reasonable and accurate guess they could come up with, even though history is not entirely certain of that. I-node was the previous spelling, however over time, the hyphen was lost. Metadata about the file it refers to is stored in inodes. The entire file’s information is contained in this metadata.

* Size

* Permission

* Owner/Group

* Here the hard drive is located

* Date/time

Read More : How To Protect Dedicated Server From A Cyber Attack?

Further details

Each used inode points to a single file. There is one inode per file. Files include directories, character files, and block devices. Each one has a single inode. There is an entry in a directory for each file that includes the filename and the inode number connected to it.

At the partition level, inodes are distinctive. Given that they are on distinct partitions, two files with the same inode number are possible. Information about inodes is kept in each partition’s strategic locations, which are frequently towards the beginning, in a table-like structure.

On the internet, there is a wealth of knowledge concerning inode numbers. I personally didn’t understand it very well, therefore, I’ll steer clear of that ethereal idea.


In simple terms, an inode number is comparable to the index page of our book in your Linux file system. You can quickly locate the material you wish to read by browsing the index page. You won’t be able to access the relevant information without an index page, and you’ll have to read the entire book to find a particular topic, which is a complete waste of time. You will undoubtedly be shouting at the author.

The inode number operates under the same principle. If you’ve observed, the word “inode” stands for “index,” and the rest you’re likely familiar with.

A unique inode number is assigned to each inode, which helps the file system keep track of inode usage. The inode number data structure contains all the metadata information, excluding the file name and, of course, the data of the file.

How does inode function?


How does inode function - Infinitive Host

A new file is given a file name and an inode number when it is created. Within that file system, an inode number is a special number. Name and inode number are both kept as directory entries.

The file name and inodes number are what was saved in the directory / when you perform the ls command “ls -li /.” The remaining data was obtained from the inode database using the inode number, including user, group, file permissions, size, etc.

Additional effects of inodes


Additional effects of inodes - Infinitivehost

It is also impossible to establish a hard link between multiple file systems due to the way inodes function. If such a task were permitted, it might result in inode numbers that clashed. On the other side, a soft link can be established between various file systems.

A hard link and the original file share the same inode number, thus even if the original file is deleted, the contents is still accessible through the hard link. In this instance, all you did was delete one of the names pointing to this inode number. Until all names connected to this inode number are removed, the information will still be accessible.

A Linux system may update without the need to reboot thanks in large part to inodes. This is so that a library file used by one process can be used by a different process that replaces it with a newer version. Consequently, a new inode should be created for the new file. Every new call to the file will use the updated version, while the currently operating process will continue to use the older version.

The capacity to store data within the inode itself is another intriguing aspect of inodes. It is known as in-lining. Because there won’t be a requirement for a data block, this storing approach provides the benefit of saving space. By limiting the number of disc accesses necessary to get the data, it also lengthens the lookup time.

There is a setting called inline data in some file systems, such as ext4. It permits the operating system to save data in this manner when enabled. Only very small files can use inclining because of size restrictions. This is a common approach to store soft link information in Ext2 and later. If the size is no larger than 60 Bytes, then yes.

Read More : What Is Linux Load Average?


Although you don’t directly deal with inodes, they are nonetheless quite significant. Knowing what they are and how they function can help you avoid a lot of difficulties on the road if a partition contains numerous very small files, like a mail server. Hope you enjoyed reading this post and discovered something new and useful about Linux’s inode.

Leave a Reply

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