JN0-106 Junos Configuration Basics Practice Question
After a series of configuration changes, an engineer wants to see only the lines that will be added or modified when the candidate is committed. Which command achieves this?
⚠ Common exam trap
Test-takers frequently confuse 'show | compare' with 'show configuration | display set' or 'commit check', thinking that displaying the full candidate configuration or validating syntax is equivalent to viewing only the changes, but only 'show | compare' provides the targeted diff output.
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
✓
show | compare
The 'show | compare' command displays the differences between the candidate configuration and the active configuration, showing only the lines that will be added, modified, or deleted upon commit. This is the standard Junos method for reviewing pending changes before committing them.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
show configuration | except
Why it's wrong here
This pipe filter excludes lines that match a specified regular expression from the displayed output. It does not perform any comparison between configuration states; it simply hides portions of the current (candidate) configuration based on pattern matching. Since it only filters the existing text stream, it cannot reveal lines that have been added, modified, or removed relative to the active configuration. Thus it is not the correct tool for viewing what has changed.
- ✗
show configuration | display set
Why it's wrong here
This converts the candidate configuration from hierarchical (curly-brace) format into a flat list of "set" commands that would be used to build that configuration. It is a rendering option that changes the format, not a comparison operation. It shows the complete desired configuration, not the delta between candidate and active. Therefore, it does not highlight which configuration statements are new, modified, or deleted, so it cannot serve as a diff view.
- ✗
commit check | match
Why it's wrong here
The commit check command validates the candidate configuration for syntax and semantic errors without committing it. Its output typically reports errors or confirms validity, and piping to "match" filters those output lines for a pattern. This command does not generate a diff of configuration changes; it only performs validation. The "match" filter merely narrows the validation output, so the combined command still provides no information about added, modified, or removed configuration lines.
- ✓
show | compare
Why this is correct
In configuration mode, "show" without a specific statement displays the candidate configuration, and appending "| compare" instructs the CLI to produce a diff against the active (committed) configuration. The output uses plus (+) and minus (-) prefixes to indicate lines to be added and removed upon commit, along with markers for changed lines. This is precisely the Junos idiom for reviewing pending changes before committing. It directly answers the question of "what will change."
About these practice questions
One of 326 original JN0-106 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 JN0-106 practice question is part of Courseiva's free Juniper Networks 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 JN0-106 exam.