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.
Saved automatically
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.
Related Questions in Computer Networks & OS
What is the architectural difference between Docker Containers and Virtual Machines (VMs)?
Beginner level • 1 views
What is the difference between 'git merge' and 'git rebase', and when should each be used in a team workflow?
Beginner level • 1 views
What is the difference between Docker Containerization and Kubernetes Container Orchestration?
Intermediate level • 1 views
How does a process differ from a thread?
Easy level • 1 views
What is virtual memory, and why is it useful even when a system has enough RAM?
Easy level • 1 views