Why does ‘/’ have the inode 2

directoryfilesystemsinode

On many *nix systems like OS X and Ubuntu, We can see the inode of root directory is 2. Then what is the inode 1 used for?

Best Answer

Inode 0 is used as a NULL value to indicate that there is no inode.

Inode 1 is used to keep track of any bad blocks on the disk; it is essentially a hidden file containing the bad blocks. Those bad blocks which are recorded using e2fsck -c.

Inode 2 is used by the root directory, and indicates starting of filesystem inodes.

Related Question