Usefull unifi shell commands

Boost your Unifi experience with these top shell commands

Shell Commands

We are going to start with the most commonly used Unifi SSH Commands, later on, I will organize them by device or function.

CommandExampleFunction
infoinfoDisplays device information
set-defaultset-defaultFactory reset device
set-informset-inform http://192.168.1.1:8080/informSet URL of the controller for adoption. More info
upgradeupgrade https://<firmware-url>.binUpgrade firmware – More info
fwupdatefwupdate --url https://<firmware-url>.binUpdate firmware
rebootrebootReboot the device
poweroffpoweroffShutdown device
uptimeuptimeShows device uptime

 

Network related SSH Commands

The following Unifi SSh Commands can really help you with finding network-related issues with your Unifi Device.

CommandExampleFunction
ifconfigifconfigShow network interface information
ip address addip address add 192.168.1.143/24 dev br0Set static IP Address
ip routeip routeDisplay current gateway
ip router addip route add default via 192.168.1.1Set default gateway
 echo "nameserver 192.168.1.1" > /etc/resolv.confSet DNS Server
pingping 1.1.1.1Check network connection to device
arparp -aShow arp table
ip neighip neighShow IPv6 neighbors

 

Unifi OS SSH Commands

When you connect to your UDM Pro (or another controller that is running Unifi OS), then you will have a couple of other options:

CommandExampleFunction
ubnt-systool helpubnt-systool helpShow all commands
ubnt-systool cputempubnt-systool cputempShow CPU Temp
ubnt-systool cpuloadubnt-systool cpuloadShow CPU load
ubnt-systool portstatusubnt-systool portstatusShow port status
ubnt-systool hostnameubnt-systool hostname <newname>Set new hostname
ubnt-systool rebootubnt-systool rebootReboot device
ubnt-systool poweroffubnt-systool poweroffShutdown device
ubnt-systool reset2defaultsubnt-systool reset2defaultsFactory reset device
ubnt-device-info summaryubnt-device-info summaryShow system information
ubnt-tools ubnt-discoverubnt-tools ubnt-discoverShow Unifi devices in the network
cat /mnt/data/udapi-config/dnsmasq.leasecat /mnt/data/udapi-config/dnsmasq.leaseShow DHCP Leases
cat /mnt/data/udapi-config/unificat /mnt/data/udapi-config/unifiShow configuration
/etc/init.d/S95unifios restart/etc/init.d/S95unifios restartRestart Unifi OS Web interface

 

Unifi Log files

There are a lot of log files that you can access to help you debug any Unifi related problem:

CommandFunction
cat /var/log/messagesOutput the error log
tail -f /var/log/messagesMonitor log file
cat /mnt/data/unifi-os/unifi-core/config/settings.yamlServer settings
cat /mnt/data/unifi-os/unifi-core/logs/discovery.logDiscovery log
cat /mnt/data/unifi-os/unifi-core/logs/system.logSystem log
cat /mnt/data/unifi-os/unifi/logs/server.logServer log
cat /mnt/data/unifi-os/unifi-core/logs/errors.logHttp errors
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
Android APK

Create a backdoor in Android APK file