EdgeRouter - Make large configuration edits (e.g. find & replace) with the CLI


Readers will learn how to make large changes (e.g., in text editor) and bring them into EdgeOS.

You can display the running configuration as the series of commands needed to produce that configuration. You can use this capability to edit the configuration off the device and reload it after having made changes that would be difficult to perform in configuration mode within EdgeOS. For example, you can use this process to make any configuration changes that exceed the limited capabilities of the rename and copy commands, or any changes that would be most efficiently made with the find and replace feature of a text editor.

Note: This article describes using the Command Line Interface (CLI) with your EdgeOS device.  For more information on CLI commands, click here.


  1. In operation mode, list the configuration commands:

    admin@gateway:~$ show configuration commands
  2. Copy the configuration commands into a text editor.
  3. Prune commands from configuration nodes that you will not need to change.
  4. Edit the commands for the nodes that you want to configure, leaving in place all commands that will be necessary to generate a full configuration for those nodes.
  5. In configuration mode, delete the existing configuration for the nodes for which you have prepared a new configuration. For example:
    admin@gateway# delete interfaces ethernet eth0
  6. Paste your edited commands into the configuration CLI.
  7. Commit and save your changes.
  8. You are finished!