OpenWRT - various useful commands

Published on Author admin

Various useful commands for OpenWRT/LEDE devices:

Show ethernet switch information:

swconfig list
swconfig dev switch0 show

Updating packages:

opkg update
opkg list-upgradable
opkg list-upgradable | awk '{ print $1 }' | xargs opkg upgrade

Installing OpenVPN (with Easy-RSA) software:

opkg install openvpn-openssl
opkg install openvpn-easy-rsa

Installing DynamicDNS client (with HTTPS nad LuCI support):

opkg install curl
opkg install wget
opkg install ddns-scripts
opkg install ddns-scripts_no-ip_com
opkg install luci-app-ddns

Defining list of files and folders which should be kept during sysupgrade:
File cat /etc/sysupgrade.conf:

/etc/sysupgrade.conf
/etc/openvpn/
/etc/easy-rsa/

Performing sysupgrade (system upgrade) from new system image:

sysupgrade -v /tmp/*.bin