}}

Installing the CLI

Updated: July 17, 2017

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. Click Install CLI from the top-left corner of the DC/OS web interface.

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

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.9/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. Point the CLI to your DC/OS cluster URL. In this example, http://example.com is the master node IP address.
    dcos config set core.dcos_url http://example.com
    
  5. Authenticate your CLI with your master node and set the auth token:
    dcos auth login
    

    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.

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.9/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. Point the CLI to your DC/OS master node. In this example, http://example.com is the master node IP address.
    dcos config set core.dcos_url http://example.com
    
  4. Authenticate your CLI with your master node and set the auth token.
    dcos auth login
    

    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. Point the CLI to your DC/OS master node. In this example, http://example.com is the master node IP address.

    dcos config set core.dcos_url http://example.com
    
  4. Authenticate your CLI with your master node:
    dcos auth login
    

    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.