Even though Unifi devices come with a great controller, sometimes you need to access your Unifi device through SSH. For example, to set up the initial connection, with the set-inform command. But what other SSH Commands are available for our Unifi devices?
Unifi SSH commands are not really documented, so most commands listed in this article come from different sources and own experience. If you have any other useful SSH commands, please add them in the commands below.
Unifi SSH Commands
We are going to start with the most commonly used Unifi SSH Commands, later on, I will organize them by device or function.
|info||Displays device information|
|set-default||Factory reset device|
|set-inform||Set URL of the controller for adoption.|
|reboot||Reboot the device|
|uptime||Shows device uptime|
Network related SSH Commands
The following Unifi SSh Commands can really help you with finding network-related issues with your Unifi Device.
|ifconfig||Show network interface information|
|ip address add||Set static IP Address|
|ip route||Display current gateway|
|ip router add||Set default gateway|
|Set DNS Server|
|ping||Check network connection to device|
|arp||Show arp table|
|ip neigh||Show 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:
|ubnt-systool cputemp||Show CPU Temp|
|ubnt-systool cpuload||Show CPU load|
|ubnt-systool portstatus||Show port status|
|ubnt-systool hostname||Set new hostname|
|ubnt-systool reboot||Reboot device|
|ubnt-systool poweroff||ubnt-systool poweroff||Shutdown device|
|ubnt-systool reset2defaults||Factory reset device|
|ubnt-device-info summary||Show system information|
|ubnt-tools ubnt-discover||Show Unifi devices in the network|
|cat /mnt/data/udapi-config/dnsmasq.lease||Show DHCP Leases|
|cat /mnt/data/udapi-config/unifi||Show configuration|
|/etc/init.d/S95unifios restart||Restart 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:
|Output the error log|
|Monitor log file|
Unifi devices are running on a form of Linux, so most Linux commands will work on the devices. Pressing Tab twice will give you a list of all available SSH commands.
Keep in mind that the Unifi Controller will override most settings when you make changes directly in the device.