Verified Jobs Live
Computer Networks & OS Intermediate Level ~3 min read

Explain Linux File Permissions, Inodes, and the difference between Hard Links and Symbolic Links.

Quick Revision Summary

An inode stores file metadata. Hard links reference the same inode directly, while soft links store a path pointer with a distinct inode.

Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Model Answer & Deep-Dive Explanation

Inodes (Index Nodes): In Linux filesystems (ext4, XFS), an inode is a data structure storing metadata about a file (file size, permissions, owner, timestamps, block pointers), excluding the file's filename and actual data bytes.

File Permissions: Represented as 3 sets of 3 bits (Owner, Group, Others) for Read (4), Write (2), and Execute (1). Example: chmod 755 gives rwxr-xr-x.

Hard Links vs Symbolic (Soft) Links:

  • Hard Link: An additional directory entry pointing directly to the existing file's same inode number. If the original filename is removed, the data remains accessible as long as the inode link count is > 0. Cannot cross filesystem boundaries or link directories.
  • Symbolic Link: A special file that stores the path string to target file with its own unique inode number. If target file is deleted, the symlink breaks (dangling link). Can cross filesystems and link directories.

Interviewer Evaluation Points & Scoring Rubric

  • 1 1. Explains what an inode stores vs filename. 2. Contrasts hard links vs soft links with inode implications. 3. Mentions file permission octal notation.