JN0-106 User Interfaces Practice Question
A junior engineer uses 'set system host-name R1' in configuration mode and exits without committing. After a reboot, the hostname reverts to the original. What step did the engineer miss?
⚠ Common exam trap
The trap here is that candidates familiar with Cisco IOS may assume changes take effect immediately in configuration mode, but Junos requires an explicit 'commit' to activate changes, and rebooting does not save uncommitted changes.
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
✓
They must commit the configuration with 'commit'.
In Junos OS, configuration changes made in configuration mode are stored in a candidate configuration and do not take effect until explicitly committed using the 'commit' command. Rebooting without committing discards all uncommitted changes, causing the hostname to revert to its original value. Option D is correct because the engineer must issue 'commit' to activate the new hostname permanently.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
They must use 'run set system host-name' instead.
Why it's wrong here
The `run` prefix in Junos is used to execute operational commands from configuration mode, such as `run show interfaces`. However, `set` is a configuration-mode command, not an operational command, so `run set system host-name` would be syntactically invalid and produce an error. To change the hostname, you must first enter configuration mode (e.g., `configure`) and then issue `set system host-name r1`; using `run` is fundamentally the wrong context for configuration statements.
- ✗
They must save the configuration to a file.
Why it's wrong here
Saving the configuration to a file, via commands like `save` or `write file`, merely writes the candidate configuration to a storage location for backup or later reference. It does not apply the candidate configuration to the active routing engine, nor does it make the change take effect. In Junos, only the `commit` operation validates and loads the candidate configuration into the active configuration, which is why saving alone leaves the system still using the previous hostname.
- ✗
They must reboot after setting the hostname.
Why it's wrong here
A reboot in Junos loads the last committed configuration from the file system, not the candidate configuration. If the `set system host-name r1` command has not been committed, a reboot will discard the change and the original hostname will remain after boot. Even if the change were committed, the hostname takes effect immediately after commit, so rebooting is unnecessary and would not alter the outcome.
- ✓
They must commit the configuration with 'commit'.
Why this is correct
Junos uses a candidate configuration model: all `set` commands are staged in the candidate configuration until explicitly activated. The `commit` command validates the candidate, applies it to the active configuration, and writes it as the permanent configuration that persists across reboots. For the hostname change to become effective immediately and survive a future reboot, you must run `commit` from configuration mode. Without this step, the change remains staged but inactive.
Go deeper
Related to this question
About these practice questions
Courseiva writes every JN0-106 question from scratch — 326 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 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.