11: Using the Command Line Interface
_______________________________________________________________________________________________________
_____________________________________________________________________________________________________
© Virtual Access 2017
GW7304 Series User Manual
Issue: 1.9
Page 77 of 336
-n name unnamed sections on export (default)
-N don't name unnamed sections
-p <path> add a search path for config change files
-P <path> add a search path for config change files and use as default
-q quiet mode (don't print error messages)
-s force strict mode (stop on parser errors, default)
-S disable strict mode
-X do not use extended syntax on 'show'
The table below describes commands for the UCI command line and some further
examples of how to use this utility.
Command
Target
Description
commit
[<config>]
Writes changes of the given configuration file,
or if none is given, all configuration files, to
the filesystem. All "uci set", "uci add", "uci
rename" and "uci delete" commands are
staged into a temporary location and written to
flash at once with "uci commit". This is not
needed after editing configuration files with a
text editor, but for scripts, GUIs and other
programs working directly with UCI files.
export
[<config>]
Exports the configuration in a UCI syntax and
does validation.
import
[<config>]
Imports configuration files in UCI syntax.
changes
[<config>]
Lists staged changes to the given configuration
file or if none given, all configuration files.
add
<config> <section-type>
Adds an anonymous section of type section-
type to the given configuration.
add_list
<config>.<section>.<option>=<string>
Adds the given string to an existing list option.
show
[<config>[.<section>[.<option>]]]
Shows the given option, section or
configuration in compressed notation.
get
<config>.<section>[.<option>]
Gets the value of the given option or the type
of the given section.
set
<config>.<section>[.<option>]=<value>
Sets the value of the given option, or add a
new section with the type set to the given
value.
delete
<config>[.<section[.<option>]]
Deletes the given section or option.
rename
<config>.<section>[.<option>]=<name>
Renames the given option or section to the
given name.
revert
<config>[.<section>[.<option>]]
Deletes staged changes to the given option,
section or configuration file.
Table 16: Common commands, target and their descriptions
Note: all operations do not act directly on the configuration files. A commit command is
required after you have finished your configuration.
root@VA_router:~# uci commit