unifi shell
About 316 words
Open an interactive configuration shell.
Usage
unifi shell [flags]Aliases: sh, console
Open an interactive shell on the controller, in the style of a network operating system.
The shell starts in exec mode (show, reload, block ...). configure terminal enters configuration mode, from where interface <device> <port>, network <name>, wifi <name> and others enter the mode of one object. Every keyword can be abbreviated, ? lists what can follow at any point, and tab completes keywords and names.
With --command, or with commands on standard input, the shell runs them as a script and stops at the first line that fails. Port commands apply at once; changes to a network, a WiFi network or another object are staged and need a commit line, and a script that ends without it fails. Commands that would cut something off need --yes.
The shell prints text. For JSON, end a show command that lists objects with | json; --output json and --output yaml are not accepted.
Examples
unifi shell
unifi shell -c "show interfaces 'Core Switch'"
unifi shell -c "conf t" -c "interface 'Core Switch' NAS" -c "poe off"
printf 'conf t\nnetwork IoT\nvlan 30\ncommit\n' | unifi shellFlags
| Flag | Description |
|---|---|
-c, --command <stringArray> | run this command and exit; repeat to run several in order |
--no-banner | do not print the welcome banner |
-y, --yes | do not ask for confirmation |
Global flags
These flags are accepted by every command.
| Flag | Description |
|---|---|
--color-scheme <string> | color scheme: auto, dark or light |
--context <string> | context to use instead of the current one |
--no-cache | ask the controller for everything instead of using cached answers |
-o, --output <string> | output format: text, wide, json, yaml (table is another name for text) |
-s, --site <string> | site to act on instead of the context's default site |
--theme <string> | theme to render with instead of the configured one |
