In this article, readers will learn about the different modes that are used in the EdgeOS Command Line Interface (CLI).
Table of Contents
Configuration and Operational Mode Basics
There are two modes in the EdgeOS command line, this article describes what each does, how to switch from one to another in the Command Line Interface and finally how to make configuration changes via CLI. The Operational Mode, represented by a dollar sign
$ is used to display the status of the device. The Configuration Mode, represented by a hashtag
# is used to make configuration changes to the device.
The default mode when logging into the command line is Operational Mode. To switch to Configuration Mode, use the
$, whereas Configuration Mode uses the hashtag
To go back to operational mode, use the
 ubnt@edgerouter# exit
Each mode has its own unique commands. You can use the question mark
? key to display all the available commands in both modes. Press the
? key twice to also display the command descriptions:
configure Enter configure mode
ping Send Internet Control Message Protocol (ICMP) echo request
reboot Reboot the system
show Show system information
shutdown Shutdown the system
traceroute Track network path to <hostname|IPv4 address>
traceroute6 Track network path to <hostname|IPv6 address>
commit Commit the current set of changes
compare Compare configuration revisions
delete Delete a configuration element
edit Edit a sub-element
exit Exit from this configuration level
run Run an operational-mode command
save Save configuration to a file
set Set the value of a parameter or create a new element
show Show the configuration (default values may be suppressed)
?does not display onscreen.
If you wish to run an Operational Mode command from while in Configuration Mode, use the
ubnt@edgerouter# run show ?
interfaces Show network interface information
ip Show IPv4 routing information
ipv6 Show IPv6 routing information
Making Configuration Changes
The EdgeRouter uses three configuration sets:
Boot/Startup ConfigWhen the EdgeRouter reboots, it loads the boot/startup configuration (config.boot)
Active ConfigCurrently active configuration with changes that have not been saved to the boot/startup configuration yet.
Working ConfigNon-active configuration with changes that have not been applied (committed) yet.
Use the following commands to make changes to the configuration:
setAdds a configuration statement from the device
deleteRemoves a configuration statement from the device
commitApplies any changes that were added with the
saveSaves the active configuration to the boot/startup configuration
Let's say that we want to enable the Telnet service, we would issue the following:
ubnt@edgerouter# set service telnet port 23
+ port 23
[ service telnet ]
Starting the telnet service. Check /var/log/messages.
comparecommand will show you the difference between the working and the active configurations.
Save the configuration changes to the boot/startup configuration by using the
Saving configuration to '/config/config.boot'...
Instead of applying changes with the
commit command, you can also use
commit-confirm. The latter command reboots the device in 10 minutes (you can customize this value) unless the commit is confirmed with the
confirm command. This is helpful when you are making changes to a remote device and you do not want to risk losing access to it. If you accidentally lock yourself out of the device, the EdgeRouter will reboot after 10 minutes and the boot/startup configuration is re-loaded.
ubnt@edgerouter# delete service telnet
ubnt@edgerouter# commit-confirm 5
commit-confirm will automatically reboot in 5 minutes unless confirmed
Type 'confirm' to stop reboot