LFCS Essential Commands Practice Question
A system administrator needs to create a hard link named /home/user/report_hardlink to an existing file /data/reports/report.txt. Which command should be used?
⚠ Common exam trap
The trap here is assuming that ln always creates symbolic links, or adding unnecessary options like -s that change the link type, when the requirement explicitly asks for a hard link.
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/reports/report.txt /home/user/report_hardlink
The ln command creates hard links by default. Providing the existing file as the first argument and the new link name as the second creates a hard link. Hard links share the same inode and data, so changes to one are reflected in the other. They cannot span filesystems. The correct command simply uses ln with the target and link name.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
ln /data/reports/report.txt /home/user/report_hardlink
Why this is correct
The ln command without options creates a hard link. The first argument is the existing target file, and the second is the new link name. This creates a hard link, which shares the same inode and data blocks as the original file, and works as long as both paths are on the same filesystem.
- ✗
ln -s /data/reports/report.txt /home/user/report_hardlink
Why it's wrong here
The -s option creates a symbolic (soft) link, not a hard link. A symbolic link is a separate file that points to the target path, and it can cross filesystems. The requirement explicitly asks for a hard link, so this command would create the wrong type of link, failing the objective.
- ✗
ln -h /data/reports/report.txt /home/user/report_hardlink
Why it's wrong here
The -h option in ln is used to follow symbolic links on the command line, affecting how the target is interpreted if it is a symlink. It does not create a hard link. Without -s, ln already creates a hard link, but the -h flag is unnecessary and could alter behavior if the target were a symlink, making this incorrect.
- ✗
link -s /data/reports/report.txt /home/user/report_hardlink
Why it's wrong here
The link command creates a hard link but does not support the -s option; that option is specific to ln. Using link with -s would cause an error or be ignored, and the command syntax is not standard for creating symbolic links. This cannot correctly create the desired hard link.
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.