4.脚本
# 4.1 更新所有软件包
- 创建脚本
# 更新软件列表
opkg update
# 更新所有 LUCI 插件
opkg list-upgradable | grep luci- | cut -f 1 -d ' ' | xargs opkg upgrade
# 如果要更新所有软件,包括 OpenWRT 内核、固件等
opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade
- 编辑
/etc/profile,设置命令别名
alias updateall="opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade"
上次更新: 2026/02/23, 04:13:25