Linux OS Internals (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is an Inode in Linux File Systems?
junior LevelCode Examplelinux-osBasic
In Simple Words: An inode (Index Node) is a fixed-size data structure storing all metadata about a file except its filename and actual content:
- Stores: File size, owner user/group ID, permissions, timestamps (
atime,mtime,ctime), and disk block pointers where data lives. - The filename is stored in a Directory Entry (dentry) which maps the human-readable string name to the numerical Inode number (
ls -i).
text
File System Inode Structure:
[Directory Entry: "app.log"] ──► [Inode #1042]
│
┌──────────────────────────┼──────────────────────────┐
▼ ▼ ▼
[Metadata: 4KB] [Perms: 0644] [Disk Block Pointers]
│
[Data Block on Disk]