All Products
Search
Document Center

Alibaba Cloud CLI:macOS

Last Updated:Dec 08, 2022

This topic describes how to install Alibaba Cloud CLI on macOS by downloading the installation package.

Procedure

  1. Download the installation package for macOS.

    Download links:

    • Official website: Direct download link for the latest version of Alibaba Cloud CLI.

    • GitHub: Download the Alibaba Cloud CLI of the required version from GitHub.

    Assume that you have downloaded the installation package named aliyun-cli-macosx-3.0.16-amd64.tgz to the $HOME/aliyun directory.
  2. Decompress the downloaded file to obtain the executable file named aliyun.

    1. Run the following command to switch the current directory to $HOME/aliyun.

      cd  $HOME/aliyun
    2. Run the following command to unzip the file aliyun-cli-macosx-3.0.16-amd64.tgz to $HOME/aliyun.

      tar xzvf aliyun-cli-macosx-3.0.16-amd64.tgz
  3. Set environment variables.

    Note

    Before completing this step, make sure that the path /usr/local/bin exists in the system variable PATH. Otherwise, you must set available environment variables for aliyun.

    Run the following command to copy aliyun to /usr/local/bin.

    sudo cp aliyun /usr/local/bin

    If you are the root user, remove the sudo command before you run the command.

    After you set the environment variables for aliyun, you can start using Alibaba Cloud CLI on your terminal.