Ubiquiti Commands
Ubiquiti UniFi and EdgeSwitch CLI commands for network devices.
Device Startup Procedure
Step 1: Power on deviceConnect PoE or power to boot Ubiquiti device
Step 2: Wait for bootWait 1-3 minutes for device to fully boot
Step 3: Verify system (UniFi)Check system status after boot
infoDisplay device information
show versionDisplay firmware version
Step 4: Check controller connectionVerify device adopted by controller (UniFi)
syswrapper.sh get-informDisplay controller inform URL
Step 5: Verify interfaces (EdgeSwitch)Check interface status
show interface statusDisplay interface status (EdgeSwitch)
Device Shutdown Procedure
Step 1: Save configuration (EdgeSwitch)Save configuration before shutdown
copy running-config startup-configSave configuration (EdgeSwitch)
write memorySave configuration alternative
Step 2: Save configuration (UniFi)Ensure UniFi device config is synced
saveSave configuration (UniFi)
cfgmtd -w -p /etc/Write configuration to flash (UniFi)
Step 3: Graceful shutdown/rebootShutdown or reboot the device
reloadReboot switch (EdgeSwitch)
rebootReboot device (UniFi)
ubnt-systool rebootReboot via system tool (UniFi)
Step 4: Factory reset (if needed)Reset device to factory defaults
ubnt-systool reset2defaultsFactory reset (UniFi)
System Information (UniFi)
infoDisplay device information
show versionDisplay firmware version
show hardwareDisplay hardware information
show uptimeDisplay system uptime
show systemDisplay system configuration
show syslogDisplay system logs
UniFi Controller Commands
set-inform http://<controller>:8080/informAdopt device to controller
mca-cli-op adopt <controller_ip> <token>Adopt device with token
mca-cli-op forgetForget controller (factory reset adoption)
cat /var/etc/persistent/cfg/mgmtDisplay controller configuration
syswrapper.sh get-informGet current inform URL
mca-cli-op set-locate onEnable locate LED
mca-cli-op set-locate offDisable locate LED
Interface Configuration (EdgeSwitch)
enableEnter privileged EXEC mode
configureEnter configuration mode
show interface statusDisplay interface status
interface <interface>Enter interface configuration mode
description <text>Set interface description
shutdownDisable interface
no shutdownEnable interface
speed <10|100|1000|auto>Set interface speed
duplex <auto|full|half>Set duplex mode
show running-configDisplay running configuration
copy running-config startup-configSave configuration
write memorySave configuration (alternative)
VLAN Configuration (EdgeSwitch)
vlan databaseEnter VLAN database mode
vlan <vlan_id>Create VLAN
vlan name <vlan_id> <name>Set VLAN name
show vlanDisplay VLAN configuration
switchport mode accessSet port to access mode
switchport access vlan <vlan_id>Assign access VLAN
switchport mode trunkSet port to trunk mode
switchport mode generalSet port to general mode
switchport trunk allowed vlan <vlan_list>Set allowed VLANs on trunk
switchport trunk native vlan <vlan_id>Set native VLAN on trunk
Link Aggregation (EdgeSwitch)
interface port-channel <id>Create port-channel
channel-group <id> mode activeAdd interface to LACP LAG (active)
channel-group <id> mode passiveAdd interface to LACP LAG (passive)
channel-group <id> mode onAdd interface to static LAG
show port-channel summaryDisplay LAG summary
show lacpDisplay LACP information
Spanning Tree (EdgeSwitch)
spanning-treeEnable spanning tree globally
spanning-tree mode stpSet STP mode to STP
spanning-tree mode rstpSet STP mode to RSTP
spanning-tree mode mstpSet STP mode to MSTP
spanning-tree priority <value>Set bridge priority
spanning-tree portfastEnable portfast on interface
spanning-tree bpduguard enableEnable BPDU guard
show spanning-treeDisplay spanning tree status
IP Configuration (EdgeSwitch)
interface vlan <vlan_id>Create/configure VLAN interface
ip address <ip> <netmask>Set IP address on interface
ip address dhcpObtain IP via DHCP
ip default-gateway <gateway>Set default gateway
ip route <network> <netmask> <gateway>Add static route
show ip interfaceDisplay IP interface configuration
show ip routeDisplay routing table
PoE Management
show poeDisplay PoE status
show poe summaryDisplay PoE summary
poe opmode <auto|shutdown|static>Set PoE operation mode
poe power-limit <watts>Set PoE power limit
no poeDisable PoE on interface
User & Security
username <name> privilege <level> password <password>Create user account
enable password <password>Set enable mode password
show usersDisplay user accounts
show users accountsDisplay detailed user information
port-securityEnable port security on interface
port-security max <num>Set maximum MAC addresses
show port-securityDisplay port security status
Monitoring & Diagnostics
show mac address-tableDisplay MAC address table
show arpDisplay ARP table
show tech-supportGenerate tech support report
show lldp neighborsDisplay LLDP neighbors
show lldp neighbors detailDisplay detailed LLDP information
show environmentDisplay temperature and power status
show cpu utilizationDisplay CPU utilization
show memoryDisplay memory usage
ping <ip>Ping IP address
traceroute <ip>Traceroute to destination
UniFi Network Commands
iwlist scanScan for wireless networks
iwconfigDisplay wireless configuration
wstalistDisplay connected wireless clients
mca-cli-op dump-cfgDump device configuration
ubnt-tools spectrum-scan <interface>Perform spectrum scan
ubnt-systool rebootReboot device
ubnt-systool reset2defaultsFactory reset device
System Maintenance (EdgeSwitch)
reloadReboot switch
boot system <image>Set boot image
show bootDisplay boot configuration
copy tftp startup-configRestore config from TFTP
copy startup-config tftpBackup config to TFTP
upgrade <url>Upgrade firmware from URL
delete backupDelete backup image
show switchDisplay switch information
clock set <time>Set system clock
ntp server <ip>Configure NTP server
UniFi Troubleshooting
tail -f /var/log/messagesMonitor system messages
cat /etc/board.infoDisplay board information
ps auxDisplay running processes
netstat -tulnDisplay listening ports
ubnt-discoverSend discovery broadcast
cfgmtd -w -p /etc/Write configuration to flash
saveSave configuration (UniFi)
rebootReboot device (UniFi)