Installing the CLI

How to install the command line interface

The recommended method to install the DC/OS CLI is from the DC/OS web interface. Or, you can manually install the CLI by using the instructions below.

Installing CLI from the web interface

  1. At the top-left corner of the DC/OS web interface, click the down arrow to the right of your cluster name.

    open cluster popup

  2. Select Install CLI.

    CLI install UI

  3. Copy and paste the code snippets into your terminal.

    CLI copy/paste

Manually installing the CLI

Installing on Linux

Prerequisites

  • A system external to your DC/OS cluster that you can install the CLI.
  • Network access from the external system to your DC/OS cluster.
  • A command-line environment, such as Terminal.
  • cURL: Installed by default on most Linux distributions.

Installing the DC/OS CLI

  1. Download the DC/OS CLI binary (dcos) to your local directory (for example, /usr/local/bin/).

    curl -O https://downloads.dcos.io/binaries/cli/linux/x86-64/dcos-1.11/dcos
    

    Important: The CLI must be installed on a system that is external to your DC/OS cluster.

  2. Move the CLI binary to your local bin directory.

    sudo mv dcos /usr/local/bin
    
  3. Make the CLI binary executable.

    chmod +x /usr/local/bin/dcos
    
  4. Set up the connection from the CLI to your DC/OS cluster. In this example, http://example.com is the master node URL.

    dcos cluster setup http://example.com
    

    Follow the instructions in the DC/OS CLI. For more information about security, see the documentation.

    Your CLI should now be authenticated with your cluster! Enter dcos to get started.

Installing on macOS

Prerequisites

  • A system external to your DC/OS cluster that you can install the CLI.
  • Network access from the external system to your DC/OS cluster.
  • A command-line environment, such as Terminal.
  • cURL: If you don’t have cURL, follow the instructions in Install curl on Mac OSX.

Installing the DC/OS CLI

  1. Download the DC/OS CLI binary (dcos) to your local directory (for example, /usr/local/bin/).

    curl -O https://downloads.dcos.io/binaries/cli/darwin/x86-64/dcos-1.11/dcos
    

    Important: The CLI must be installed on a system that is external to your DC/OS cluster.

  2. Make the CLI binary executable.

    chmod +x dcos
    
  3. Set up the connection from the CLI to your DC/OS cluster. In this example, http://example.com is the master node URL.

    dcos cluster setup http://example.com
    

    Tip: If your system is unable to find the executable, you may need to re-open the command prompt or add the installation directory to your PATH environment variable manually.

    Follow the instructions in the DC/OS CLI. For more information about security, see the documentation.

    Your CLI should now be authenticated with your cluster! Enter dcos to get started.

Installing on Windows

Prerequisites

  • A system external to your DC/OS cluster onto which you will install the CLI
  • Network access from the external system to your DC/OS cluster
  • A command-line environment, such as Windows Powershell, which is installed by default on Windows 7 and later
  • Disable any security or antivirus software before beginning the installation.
  1. Run command-line environment as Administrator.

  2. Download the DC/OS CLI executable to your local directory (dcos.exe).

  3. Set up the connection from the CLI to your DC/OS cluster. In this example, http://example.com is the master node URL.

    dcos cluster setup http://example.com
    

    Follow the instructions in the DC/OS CLI. For more information about security, see the documentation.

    Your CLI should now be authenticated with your cluster! Enter dcos to get started.