LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

uci

OpenWrt unified configuration interface

TLDR

Read a single option
$ uci get [network.lan.ipaddr]
copy
Dump an entire configuration file
$ uci show [network]
copy
Dump just one section
$ uci show [network.lan]
copy
Change an option
$ uci set [network.lan.ipaddr]=[192.168.2.1]
copy
Add an anonymous section
$ uci add [firewall] [rule]
copy
Rename a section to something readable
$ uci rename [network].[cfg01]=[lan]
copy
Append a value to a list option
$ uci add_list [network.lan.dns]=[1.1.1.1]
copy
Remove one value from a list option
$ uci del_list [network.lan.dns]=[1.1.1.1]
copy
Delete an option or a whole section
$ uci delete [network.guest]
copy
Review the changes that are staged but not yet written
$ uci changes
copy
Write the staged changes to disk
$ uci commit [network]
copy
Discard the staged changes
$ uci revert [network]
copy
Export a configuration in a form that can be imported again
$ uci export [network]
copy

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 files are stored in /etc/config/ and are organized into files, sections, and options. Changes are staged in a temporary location and must be committed to take effect. The revert command discards uncommitted changes.

COMMANDS

get CONFIG.SECTION.OPTION

Fetch a value
show [CONFIG]
List all options and values
set CONFIG.SECTION.OPTION=VALUE
Set a configuration value
add CONFIG SECTION
Add a new anonymous section
delete CONFIG.SECTION[.OPTION]
Delete section or option
rename CONFIG.SECTION[.OPTION]=NAME
Rename a section or option
add_list CONFIG.SECTION.OPTION=VALUE
Add a value to a list option
del_list CONFIG.SECTION.OPTION=VALUE
Remove a value from a list option
commit [CONFIG]
Write changes to configuration file
revert CONFIG
Discard uncommitted changes
changes [CONFIG]
Display pending uncommitted changes
export [CONFIG]
Export configuration in machine-readable format

INSTALL

nix profile install nixpkgs#uci
copy

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.

SEE ALSO

ubus(1), opkg(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid