# 🖥️ Command Line Interface

For instruction on how to access Gateway Shell/CLI please refer to guide.

# Command Modes

The are two command modes in Enapter CLI: operational mode and configuration mode.

  • Operational mode provides access to operational commands for showing help information, exiting CLI, showing system information, etc.
  • Configuration provides access to commands for creating, modifying, deleting, committing and showing configuration information, as well as commands for navigating through the configuration hierarchy.

When you log on to the system, the system is in operational mode.

  • To enter configuration mode from operational mode, issue the configure command.
  • To return to operational mode from configuration mode, issue the exit command. If there are uncommitted configuration changes, you must either commit the changes using the commit command, or enter exit to discard the changes.

# Configuration Mode

In configuration mode you can set, delete and show information. Enter configuration mode by typing configure at the command prompt in operational mode.

[enapter] $ configure
[enapter] conf $

[enapter] conf $ exit
[enapter] $

Notice how the command prompt changes to remind you what mode you are in.

# Command Completion

Pressing the <Tab> key provides command completion. You can use the <Tab> to show:

  • All available commands
  • All valid completions for a command partially typed in
  • The next available set of options for a command. You can use the <Tab> key iteratively in this way to discover complete command syntax.

Example 2-1 Use command completion on an unambiguous command

The following example requests command completion for the typed string sh. In this example, the command to be completed is unambiguous.

[enapter] conf $ sh <tab>
[enapter] conf $ show

# List of Possible Commands in Operational Mode

Command Description
exit Exit shell
help Display help message
services Services operations
variables Variables operations
show Show system information
network Network configuration commands
configure Enter configuration mode
factory-reset Factory reset
reboot Reboot server
ping Execute ping command

# Public MQTT Setup

Note

Public MQTT port is 9883.

To configure the public MQTT settings, please enter the following commands while in configuration mode:

set public-mqtt authentication username "public"
set public-mqtt authentication password "password"
commit
save