The DC/OS command line interface (DC/OS CLI) utility allows you to manage cluster nodes, install and manage packages, inspect the cluster state, and manage services and tasks from a terminal. DC/OS 1.11 requires the DC/OS CLI 0.6.x.
To list available commands, run
dcos with no parameters:
dcos Command line utility for the Mesosphere Datacenter Operating System (DC/OS). The Mesosphere DC/OS is a distributed operating system built around Apache Mesos. This utility provides tools for easy management of a DC/OS installation. Available DC/OS commands: auth Authenticate to DC/OS cluster backup Back up and restore cluster Manage connections to DC/OS clusters config Manage the DC/OS configuration file edgelb Manage load balancing with Edge-LB experimental Commands under development, subject to change help Display help information about DC/OS job Deploy and manage jobs in DC/OS license Use the DC/OS license marathon Deploy and manage applications to DC/OS node Administer and manage DC/OS cluster nodes package Install and manage DC/OS software packages security Manage the DC/OS certificate authority service Manage DC/OS services task Manage DC/OS tasks Get detailed command description with `dcos <command> --help`.
Displaying the DC/OS CLI version
To display the DC/OS CLI version, run:
DC/OS CLI versions and configuration files
DC/OS CLI 0.4.x and 0.5.x use a different structure for the location of configuration files.
DC/OS CLI 0.4.x has a single configuration file, which by default is stored in
~/.dcos/dcos.toml. In DC/OS CLI 0.4.x you can optionally change the location of the configuration file using the
DCOS_CONFIG environment variable.
DC/OS CLI 0.5.x has a configuration file for each connected cluster, which by default is stored in
~/.dcos/clusters/<cluster_id>/dcos.toml. In DC/OS CLI 0.5.x you can optionally change the base portion (
~/.dcos) of the configuration directory using the
DCOS_DIR environment variable.
- If you update to the DC/OS CLI 0.5.x and run any CLI command, it will trigger conversion from the old to the new configuration structure.
- After you call
dcos cluster setup, (or after conversion has occurred), if you attempt to update the cluster configuration using a
dcos config setcommand, the command displays a warning message saying the command is deprecated and the cluster configuration state may now be corrupted.
The DC/OS CLI supports the following environment variables, which can be set dynamically.
DCOS_CLUSTER (DC/OS CLI 0.5.x and higher only)
The attached cluster. To set the attached cluster, set the variable with the command:
DCOS_CONFIG (DC/OS CLI 0.4.x only)
The path to a DC/OS configuration file. If you put the DC/OS configuration file in
/home/jdoe/config/dcos.toml, set the variable with the command:
If you have the
DCOS_CONFIG environment variable configured:
- After conversion to the new configuration structure,
DCOS_CONFIGis no longer honored.
- Before you call
dcos cluster setup, you can change the configuration pointed to by
dcos config set. This command displays a warning message saying the command is deprecated and recommends using
dcos cluster setup.
DCOS_DIR (DC/OS CLI 0.5.x and later only)
The path to a DC/OS configuration directory. If you want the DC/OS configuration directory to be
/home/jdoe/config, set the variable with the command:
dcos cluster setupcommand.
export DCOS_DIR=<path/to/config_dir> (optional, default when not set is ~/.dcos) dcos cluster setup <url>
This setting generates and updates per cluster configuration under
$DCOS_DIR/clusters/<cluster_id>. Sets newly set up cluster as the attached one.
Indicates whether to verify SSL certificates or set the path to the SSL certificates. You must set this variable manually. Setting this environment variable is equivalent to setting the
dcos config set core.ssl_verify option in the DC/OS configuration file. For example, to indicate that you want to set the path to SSL certificates:
Displays log messages to
stderr at or above the level indicated. This is equivalent to the
--log-level command-line option. The severity levels are:
- debug Displays all messages to
stderr, including informational, warning, error, and critical.
- info Displays informational, warning, error, and critical messages to
- warning Displays warning, error, and critical messages to
- error Displays error and critical messages to
- critical Displays only critical messages to
For example, to set the log level to warning:
Indicates whether to print additional debug messages to
stdout. By default this is set to
false. For example:
Installing the CLI
Installing the DC/OS command line interface…Read More
Configuring the CLI
Configuring the command line interface…Read More
Updating the CLI
Updating the command line interface…Read More
Uninstalling the CLI
Uninstalling the DC/OS command line interface…Read More
DC/OS Enterprise CLI
Configuring the DC/OS Enterprise command line interface…Read More
Exploring the commands unique to DC/OS…Read More