LFCS Essential Commands Practice Question
A junior administrator needs to create a symbolic link named /usr/local/bin/editor that points to /opt/tools/vim.bin. The link must be created without overwriting any existing file at the destination. Which command accomplishes this?
⚠ Common exam trap
The trap here is assuming that ln without -s still creates a symbolic link, when it actually creates 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 -s /opt/tools/vim.bin /usr/local/bin/editor
Creating a symbolic link is done with ln -s target linkname. Because the destination does not exist, no force flag is required and the command completes without overwriting anything. The hard-link variant lacks -s and would not produce a symbolic link, while the forced variant introduces overwrite risk that the scenario explicitly forbids.
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 /opt/tools/vim.bin /usr/local/bin/editor
Why it's wrong here
Without the -s flag, ln creates a hard link, not a symbolic link. A hard link cannot span filesystems and shares the same inode as the target, so it does not satisfy the requirement for a symbolic link pointing at /opt/tools/vim.bin, and it would fail if /usr/local and /opt are separate filesystems.
- ✗
ln -sf /opt/tools/vim.bin /usr/local/bin/editor
Why it's wrong here
The -f flag forces removal of an existing destination file before creating the link. Since the requirement is to avoid overwriting any existing file, using -f is unnecessary and could destroy a file that happens to already exist at /usr/local/bin/editor, making this command unsafe for the stated goal.
- ✗
cp -s /opt/tools/vim.bin /usr/local/bin/editor
Why it's wrong here
cp does not have a -s option that creates symbolic links; the -s option in cp makes a symbolic link instead of copying, but the invocation shown is not the documented way to create a standalone symlink and is not equivalent to ln -s. It also risks copying behavior or errors depending on the distribution.
- ✓
ln -s /opt/tools/vim.bin /usr/local/bin/editor
Why this is correct
The ln -s command creates a symbolic link, and because the destination path does not exist yet, the link is created cleanly without touching any existing file. This matches the requirement exactly: a symbolic link at the specified path pointing to the target binary, with no overwrite behavior needed.
Go deeper
Related to this question
About these practice questions
One of 406 original LFCS 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 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.