uci
TLDR
Get a value
$ uci get [network.lan.ipaddr]
Show all options$ uci show [network]
Set a value$ uci set [config].[section].[option]=[value]
Add new section$ uci add [config] [section]
Delete section or option$ uci delete [config].[section].[option]
Commit changes$ uci commit [config]
Revert uncommitted changes$ uci revert [config]
SYNOPSIS
uci COMMAND [ARGUMENTS...]
DESCRIPTION
uci (Unified Configuration Interface) manages OpenWrt configuration files. It provides a standardized way to read and modify the UCI configuration format used throughout OpenWrt.
Configuration is organized into files, sections, and options. Changes are staged and must be committed to take effect. The revert command discards uncommitted changes.
COMMANDS
get CONFIG.SECTION.OPTION
Fetch a valueshow CONFIG
List all options and valuesset CONFIG.SECTION.OPTION=VALUE
Set a configuration valueadd CONFIG SECTION
Add a new sectiondelete CONFIG.SECTION[.OPTION]
Delete section or optioncommit CONFIG
Write changes to configuration filerevert CONFIG
Discard uncommitted changes
CAVEATS
OpenWrt specific. Changes require commit to apply. Some services need restart after configuration changes. Invalid configuration can break network access.
HISTORY
UCI was developed for OpenWrt to provide a consistent configuration interface across all system services, simplifying administration of embedded routers and devices.


