Undocumented EdgeOS commands

Note: I'm no longer actively involved with EdgeOS, since Ubiquiti essentially turned it into yet another proprietary product. This was written back in 2013, and I have no idea if it's still relevant.

There are some hidden utilities in Ubiquiti EdgeOS that are often used in its scripts but aren't documented anywhere. Here's a non-exhaustive (and probably even inaccurate) list of the hidden commands.

There is probably no reason to use them.

This list was compiled by reading the scripts, I don't have access to the source code of these binaries.

/usr/sbin/ubnt-hal

Option Arguments Description
getBoardName None Prints symbolic board name (e.g. "EdgeRouter Lite 3-Port")
show-version None Prints system version information ("show version" does exactly that)
getBoardId None Prints board identifier (e.g. "e102" for ERL)
hasPoe None Exits with 0 if platform support PoE, exists with 1 otherwise (additionally prints 0 if PoE supported, 1 otherwise)
getPortCount None Prints ethernet port count
input48v None Exits with 0 and prints 1 if 48 volt PoE is supported (the opposite if not)
wdGetStats Interface name or number (?) Prints PoE watchdog statistics

/usr/sbin/ubnt-hal-e

Option Arguments Description
getBoardIdE None Same to "ubnt-hal getBoardIdE"
showEthPhysicalE Interface name (e.g. eth0) or number (e.g. 0) Show physical port information (link status, speed etc.)
onSwitch None Exits with 0 and prints 1 if the interface is a switch port (the opposite if not)
allSwitchPortsSwitchedE None Returns 0 if all switch ports are in switch mode, 1 otherwise

/usr/sbin/ubnt-ifctl

Option Arguments Description
set-poe interface name, value (24v|48v|off) Sets PoE
show-poe-status None Shows PoE status
list-sys-intfs Interface type (e.g. ethernet, bridge, switch, vif etc.) or "all" Prints list of interfaces of specified type
list-non-switch-intfs None Returns a list of non-switch interfaces
show-switch None Shows switch information
valid-mac MAC address Exits with 0 if the argument is a valid MAC address, 1 otherwise (also prints error message)
valid-intf Interface name, interface type (e.g. "eth0 ethernet") Exits with 0 if interface name is a valid and existing interface of that type
check-non-switch-intf Interface name Returns 0 is given interface is not a switch port
eth-begin ? ?
eth-end ? ?
eth-commit ? ?
This page was last modified: 2013 Aug 11