openwrt uci常用命令
1.修改 br-lan 的默认IP,网关,dns:uci set network.lan.ipaddr=192.168.2.1 uci set network.lan.gateway=19...
文件 | 作用 |
/etc/config/dhcp | 面向LAN口提供的IP地址分配服务配置 |
/etc/config/dropbear | SSH服务配置 |
/etc/config/firewall | 路由转发,端口转发,防火墙规则 |
/etc/config/network | 自身网络接口配置 |
/etc/config/system | 时间服务器时区配置 |
/etc/config/wireless | 无线网络配置 |
4.UCI 命令读写配置
命令:
参数:
-c <path> set the search path for config files (default: /etc/config)
-d <str> set the delimiter for list values in uci show
-f <file> use <file> as input instead of stdin
-m when importing, merge data into an existing package
-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'