In this article, readers will learn about the different modes that are used in the EdgeOS Command Line Interface (CLI).
NOTES & REQUIREMENTS: Applicable to the latest EdgeOS firmware on all EdgeRouter models. Knowledge of the Command Line Interface (CLI) and basic networking knowledge is required. Please see the Related Articles below for more information.
Devices used in this article:
Table of Contents
- Configuration and Operational Mode Basics
- Making Configuration Changes
- Related Articles
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.
Configuration and Operational Mode Basics
When you log in to the EdgeRouter via SSH/Telnet or by using the CLI button in the GUI, the default mode is operational mode. To switch to configuration mode, use the
NOTE: Operational Mode is indicated by a dollar sign
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)
NOTE: The second question mark
If you wish to run an operational mode command from while on 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 Config: When the EdgeRouter reboots, it loads the boot/startup configuration (config.boot)
- Active Config: Currently active configuration with changes that have not been saved to the boot/startup configuration yet.
- Working Config: Non-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.
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