This topic describes how to install Alibaba Cloud CLI on macOS by downloading the installation package.
Download the installation package for macOS.
Assume that you have downloaded the installation package named aliyun-cli-macosx-3.0.16-amd64.tgz to the $HOME/aliyun directory.
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.
Decompress the downloaded file to obtain the executable file named
Run the following command to switch the current directory to $HOME/aliyun.
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
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
Run the following command to copy
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.