XK0-006 System Management Practice Question
An administrator needs to create a hard link to an existing file. Which two statements are true about hard links? (Choose two.)
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Hard links are indistinguishable from the original file
Option C is correct because a hard link is simply another directory entry that points to the same inode, so it has identical permissions, ownership, timestamps, and content as the original file and cannot be distinguished from it by normal file operations. Option D is correct because creating a hard link with ln (without -s) increments the inode's link count and gives the new name the same inode number as the original file, which is why both names reference the same data blocks. Option A is wrong because hard links to directories are prohibited on Linux filesystems to prevent cycles in the directory tree. Option B is wrong because a hard link must reside on the same filesystem as the target file, since inode numbers are only unique within a single filesystem. Option E is wrong because deleting the original name only decrements the link count; the data remains accessible through the remaining hard link until the link count reaches zero.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Hard links can be created for directories
Why it's wrong here
Hard links cannot target directories, since that would create cycles in the filesystem tree; only superuser-level tools like bind mounts achieve directory aliasing. It tempts because directories are files with inodes, yet the kernel forbids multiple hard links to them to preserve acyclicity.
- ✗
Hard links can be created across different filesystems
Why it's wrong here
Hard links reference the same inode within one filesystem; the inode number is meaningless elsewhere, so cross-filesystem links cannot be created. It tempts because symbolic links do traverse filesystems, but those are separate directory entries pointing at a pathname, not shared inodes.
- ✓
Hard links are indistinguishable from the original file
Why this is correct
Hard links share the same inode as the original file, so both directory entries reference identical metadata and data blocks. No separate inode exists to distinguish them, satisfying the stem's requirement that the link is indistinguishable from the original. Deleting either name leaves the other fully functional until the link count reaches zero.
- ✓
Hard links share the same inode number
Why this is correct
Hard links point to the same inode, so both directory entries reference identical metadata and data blocks. This satisfies the scenario's requirement: creating another name for an existing file without duplicating content. Deleting one link decrements the inode's link count; the data persists until the final link is removed.
- ✗
Deleting the original file removes the hard link
Why it's wrong here
Each hard link is an independent directory entry pointing to the same inode; deleting the original merely decrements the link count, leaving other links intact until the count reaches zero. It is tempting because symbolic links do break when their target is removed, but that behaviour applies to symlinks, not hard links.
Go deeper
Related to this question
Learn chapter
Navigating the Filesystem
Key term
Hard link
A hard link is a directory entry that associates a name with a file's data on a storage device, allowing multiple filenames to point to the same underlying inode and data blocks.
Key term
inode
An inode is a data structure in a Unix-like file system that stores metadata about a file, such as its size, permissions, and location on disk, but not its name.
About these practice questions
One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.