The CLI: General and Base Commands
When you enter CLI at the bash prompt, this puts you at the base level of the CLI. You can also jump directly to a specific level or even run a command directly without entering the interactive mode of the CLI. You do this by providing the full path to what you are trying to access. For example, to show the current network configuration for interface eth0 you could run the command cli system show eth0 directly from the bash prompt.
Command Flags
- Some commands available in the CLI can take various flags to alter the default behavior of the command. The normal format for these flags is in the form: command | flags
- If you want to pass multiple flags to a command, do so by separating the flags with a space as follows: command | flag1 flag2 flag3
![]() | Note: Any unknown or invalid flags passed are ignored. |
Special Characters–-When passing a value to the CLI that contains special characters you should wrap the value in quotes. You should also do this for any value or argument that contains spaces. For example if you are setting the the engine.server_name parameter in config and you want the value to be Microsoft IIS, run the following command: cli config set engine.server_name "Microsoft IIS" If you do not quote the value the example, then the parameter would be incorrectly set to the value Microsoft.
The following sections provide lists of commands you can reference when using the CLI.
Table 1: General CLI Commands
Command | Syntax | Description |
---|---|---|
color | color | Changes the display of color in the CLI. By default, only the default terminal foreground color is used for all output. If enabled then output of certain commands is syntax highlighted to make it easier to distinguish certain types of information. Example: > color Color Enabled > color Color Disabled |
echo | echo [string] | Echos the string passed to it back to the screen. The main purpose of this command is to give you the ability to provide a status message when writing automated scripts against the CLI. Example: > echo Hello, World! Hello, World! |
exit | exit | Exits the current level of the CLI and returns you to the entry point of that level. Example: > system system> exit > _ |
help | help [topic] | Displays help information about the various levels and command available within the CLI. Example: > help echo Summary: echo the given string back to the terminal Syntax: echo [string] This is a simple implementation of a echo command. |
pager | pager | Toggles use of the screen pager for output longer than your current screen size. When enabled, the output of commands are paginated according to the size of your current terminal window. When disabled, the pagination will not take affect which can make it difficult to view long output from some commands. Example: > pager Pager Disabled > pager Pager Enabled |
tee | tee | Toggles teeing of output to a log file. When enabled, all output displayed inside the CLI is also logged to a file in the user's home directory. Example: > tee Output logging to /home/mykonos/2014-04-03-19:06:59.697271.log > tee Output logging stopped |
Table 2: Base Level CLI Commands
Command | Syntax | Description |
---|---|---|
config | config [subcommand] | Enter the configuration level of the CLI. From here you can manage the various configuration settings used by WebApp Secure. System specific settings such as network configuration, or settings that only affect a limited number of nodes in a cluster/install are not handled through the configuration level. For system specific configuration settings please see the system level of the CLI. Example: > config show engine.enabled true Refer to The CLI: Configuration Level Commands for details. |
system | system [subcommand] | Enter the system level of the CLI. The system level is where all local system configuration is done and where local system actions can be performed. This level is also where HA actions/configuration is located. Example: > system services status mykonos-security-engine mykonos-security-engine (pid 9150) is running... Refer to The CLI: System Level Commands for details. |
support | support [subcommand] | Enter the support level of the CLI. This level provides support features meant for troubleshooting system problems. Example: > support bundle The support bundle has been successfully sent to the support staff. |