LFCS Essential Commands Practice Question
A technician must create a hard link named 'report_link' to an existing file '/data/report.txt'. Which command should be used?
⚠ Common exam trap
The trap here is assuming that ln always creates symbolic links; actually, the -s option is needed for symbolic links, while the default is hard links.
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
✓
ln /data/report.txt report_link
The ln command without options creates a hard link by default. This results in two directory entries pointing to the same inode, which is exactly what a hard link is. The other commands either create symbolic links, copies, or rename the file, none of which produce a hard link as required.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
cp /data/report.txt report_link
Why it's wrong here
cp creates a copy of the file, not a hard link. The copy has its own inode and separate data blocks. Modifications to one file do not affect the other. This does not satisfy the requirement to create a hard link.
- ✓
ln /data/report.txt report_link
Why this is correct
Without any options, ln creates a hard link. This command creates a hard link named report_link that points to the same inode as /data/report.txt. Both names refer to the same file data, and changes through either name are reflected in the other.
- ✗
mv /data/report.txt report_link
Why it's wrong here
mv renames or moves the file, so /data/report.txt would no longer exist under that name. This does not create a hard link; it simply changes the file's name or location. The original file would be gone, which is not the intended outcome.
- ✗
ln -s /data/report.txt report_link
Why it's wrong here
The -s option creates a symbolic link, not a hard link. A symbolic link is a separate file that points to the target, while a hard link shares the same inode. This command would create a symbolic link named report_link, which does not meet the hard link requirement.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.