Ubiquiti UniFi Command-Line Interface Reference
Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 1
  • 1
  •  
  •  
  •  
  •  
    5
    Shares


⇐ BackPageNext ⇒
Commands

M

ABCDEFGHIJKLMNOPQRSTUVWXYZ


mca-cli

UniFi Command Line Interface.

mca-cli <applet> [arguments...]

   info                      display AP information
   set-default               restore to factory default
   set-inform <inform_url>   attempt inform URL (e.g. set-inform http://192.168.0.8:8080/inform)
   upgrade <firmware_url>    upgrade firmware (e.g. upgrade http://192.168.0.8/unifi_fw.bin)
   reboot                    reboot the AP
These applets are available directly from the command line without needing to first invoke the mca-cli command.


mca-cli-op

UniFi Command Line Interface.

mca-cli-op <applet> [arguments...]

   info                      display AP information
   set-default               restore to factory default
   set-inform <inform_url>   attempt inform URL (e.g. set-inform http://192.168.0.8:8080/inform)
   upgrade <firmware_url>    upgrade firmware (e.g. upgrade http://192.168.0.8/unifi_fw.bin)
   reboot                    reboot the AP
These applets are available directly from the command line without needing to first invoke the mca-cli command.


mca-ctrl

Management Console Agent Controller.

mca-ctrl -t <operation> [options...]
 dump: dump inform information
 connect -s <url> [-k <authkey hex32>]: set the inform
 ping: ping mcad (check if it's alive/responding)
 log: change mcad's log level
 options:
 -v[vvv]: increase the log level
UNBTSee Alsomcad


mca-dump

Dumps the device’s configuration to stdout.

mca-dump


mca-monitor
mca-monitor


mca-sta
mca-sta [options] 

    mca-dump     : dump all reporting stat
    mca-sta : show stat for sta

options:
    -h: help
    -l: loop
UNBTSee Alsomca.sh


mca.sh

Shell script for running the mca-sta command.

mca.sh [options] 

    mca-dump     : dump all reporting stat
    mca-sta : show stat for sta

options:
    -h: help
    -l: loop


mcad

Management Console Agent.

 mcad [options]
        -d               debug (logging to stdout)
        -h               print this help


md5sum

Print or check MD5 checksums.

md5sum [OPTIONS] [FILE]... or: md5sum [OPTIONS] -c [FILE]

        -c      Check sums against given list
        -s      Don't output anything, status code shows success
        -w      Warn about improperly formatted checksum lines
Example

The following example shows how to print the MD5 checksum of a file.

# md5sum /bin/busybox
890787f68af66e5dd18e09237b00f440  /bin/busybox
[_/su_spoiler]


mem
mem <pid> <cmd>


mesg

Control write access to your terminal.

mesg [y|n]

     y   Allow write access to your terminal  
     n   Disallow write access to your terminal


mkdir

Create DIRECTORY.

mkdir [OPTIONS] DIRECTORY...

        -m      Mode
        -p      No error if exists; make parent directories as needed


mkfifo

Create named pipe (identical to ‘mknod name p’).

mkfifo [OPTIONS] name

        -m MODE Mode (default a=rw)


mknod

Create a special file (block, character, or pipe).

mknod [OPTIONS] NAME TYPE MAJOR MINOR

        -m      Create the special file using the specified mode (default a=rw)
TYPEs include:
        b:      Make a block device
        c or u: Make a character device
        p:      Make a named pipe (MAJOR and MINOR are ignored)


mktemp

Create a temporary file with name based on TEMPLATE and print its name. TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).

mktemp [-dt] [-p DIR] [TEMPLATE]

        -m      Create the special file using the specified mode (default a=rw)
TYPEs include:
        -d      Make a directory instead of a file
        -t      Generate a path rooted in temporary directory
        -p DIR  Use DIR as a temporary directory (implies -t)
For -t or -p, directory is chosen as follows: $TMPDIR if set, else -p DIR, else /tmp.


mount

Mount a filesystem. Filesystem autodetection requires /proc.

mount [flags] DEVICE NODE [-o OPT,OPT]

        -a              Mount all filesystems in fstab
        -f              Dry run
        -i              Don't run mount helper
        -r              Read-only mount
        -w              Read-write mount (default)
        -t FSTYPE       Filesystem type
        -O OPT          Mount only filesystems with option OPT (-a only)
-o OPT:
        loop            Ignored (loop devices are autodetected)
        [a]sync         Writes are [a]synchronous
        [no]atime       Disable/enable updates to inode access times
        [no]diratime    Disable/enable atime updates to directories
        [no]relatime    Disable/enable atime updates relative to modification time
        [no]dev         (Dis)allow use of special device files
        [no]exec        (Dis)allow use of executable files
        [no]suid        (Dis)allow set-user-id-root programs
        [r]shared       Convert [recursively] to a shared subtree
        [r]slave        Convert [recursively] to a slave subtree
        [r]private      Convert [recursively] to a private subtree
        [un]bindable    Make mount point [un]able to be bind mounted
        bind            Bind a directory to an additional location
        move            Relocate an existing mount point
        remount         Remount a mounted filesystem, changing its flags
        ro/rw           Read-only/read-write mount
There are EVEN MORE flags that are specific to each filesystem. You’ll have to see the written documentation for those filesystems.


mpstat

Per-processor statistics.

mpstat [-A] [-I SUM|CPU|ALL|SCPU] [-u] [-P num|ALL] [INTERVAL [COUNT]]

        -A                      Same as -I ALL -u -P ALL
        -I SUM|CPU|ALL|SCPU     Report interrupt statistics
        -P num|ALL              Processor to monitor
        -u                      Report CPU utilization
Example: UniFi AP AC (UAP-ACv2)

The following example shows how to display per-processor statistics.

# mpstat
Linux 2.6.22 (UBNT)     07/18/15

20:44:29     CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
20:44:29     all    0.19    0.00    0.48    0.00    0.05    0.58    0.00   98.71    165.96
[_/su_spoiler]
Example: UniFi Switch 48 750W (USW-48P-750)

The following example shows how to display per-processor statistics.

# mpstat
Linux 3.6.5 (UBNT)      07/18/15        _armv7l_        (1 CPU)

20:47:06     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
20:47:06     all   17.12    0.00    2.47    0.00    0.00   50.84    0.00    0.00   29.57
[_/su_spoiler]


mtd
mtd [<options> ...] <command> [<arguments> ...] <device>[:<device>...]

The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
        unlock                  unlock the device
        refresh                 refresh mtd partition
        erase                   erase all data on device
        write <imagefile>|-     write <imagefile> (use - for stdin) to device
        jffs2write <file>       append <file> to the jffs2 partition on the device
Following options are available:
        -q                      quiet mode (once: no [w] on writing, twice: no status messages)
        -r                      reboot after successful command
        -f                      force write without trx checks
        -e <device>             erase <device> before executing the command
        -d <name>               directory for jffs2write, defaults to "tmp"
        -j <name>               integrate <file> into jffs2 data when writing an image
As an example, to write linux.trx to mtd4 labeled as linux and reboot afterwards, use mtd -r write linux.trx linux.


mv

Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY

mv [OPTIONS] SOURCE DEST or: mv [OPTIONS] SOURCE... DIRECTORY

        -f      Don't prompt before overwriting
        -i      Interactive, prompt before overwrite
ABCDEFGHIJKLMNOPQRSTUVWXYZ
⇐ BackPageNext ⇒

Ubiquiti UniFi Command-Line Interface Reference

Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 1
  • 1
  •  
  •  
  •  
  •  
    5
    Shares
Tagged on:                     

Leave a Reply