Installing Cloud CLI in Linux
Cloud CLI can be run on Linux AMD64 or Linux Arm64. You can install the CLI with one click or in several steps. If you choose step-by-step installation, use the installation command that matches your OS. Run the following command to query the OS used by your host:
echo $HOSTTYPE
If the command output is x86_64, use the download command for AMD64. If the command output is aarch64, use the download command for Arm64.
One-Click Installation
Run the following command to install Cloud CLI:
curl -sSL https://sbc-cli.obs.ru-moscow-1.hc.sbercloud.ru/cli/latest/cloud_install.sh -o ./cloud_install.sh && bash ./cloud_install.sh
By default, the Cloud CLI file is downloaded to the /usr/local/cloud/ directory and then moved to the /usr/local/bin/ directory. You can run cloud commands in any directory. (Ensure that the value of the system variable PATH contains /usr/local/bin.)
You can modify the file download directory based on the interaction information during command execution. If you do not have sufficient permissions, switch to user root and run the installation command again.
To use the default configuration and skip the interaction, add -y to the end of the command as follows:
curl -sSL https://sbc-cli.obs.ru-moscow-1.hc.sbercloud.ru/cli/latest/cloud_install.sh -o ./cloud_install.sh && bash ./cloud_install.sh -y
Step-by-Step Installation
Perform the following steps:
- Run one of the following commands to download Cloud CLI:
- curl commands
- Download command for AMD64curl -LO "https://sbc-cli.obs.ru-moscow-1.hc.sbercloud.ru/cli/latest/cloud-cli-linux-amd64.tar.gz"
- Download command for Arm64curl -LO "https://sbc-cli.obs.ru-moscow-1.hc.sbercloud.ru/cli/latest/cloud-cli-linux-arm64.tar.gz"
- Download command for AMD64
- wget commands
- Download command for AMD64wget "https://sbc-cli.obs.ru-moscow-1.hc.sbercloud.ru/cli/latest/cloud-cli-linux-amd64.tar.gz" -O cloud-cli-linux-amd64.tar.gz
- Download command for Arm64wget "https://sbc-cli.obs.ru-moscow-1.hc.sbercloud.ru/cli/latest/cloud-cli-linux-arm64.tar.gz" -O cloud-cli-linux-arm64.tar.gz
- Download command for AMD64
- curl commands
- Decompress the tool package.
- Decompression command for AMD64tar -zxvf cloud-cli-linux-amd64.tar.gz
- Decompression command for Arm64tar -zxvf cloud-cli-linux-arm64.tar.gz
- Decompression command for AMD64
- (Optional) Move Cloud CLI to /usr/local/bin so that you can run cloud commands in any directory. Ensure that /usr/local/bin exists in the value of the system variable PATH.mv $(pwd)/cloud /usr/local/bin/
- (Optional) Run the following command to turn on autocomplete:cloud auto-complete on
If the following information is displayed, autocomplete is turned on. If the configuration does not take effect, run the bash command as prompted.
cloud auto-complete onAutocomplete (bash only) turned on. If it does not work, run the `bash` command. - (Optional) Run the following command to check whether the installation is successful:cloud version
If version information similar to the following is displayed, the installation is successful:
cloud versionCurrent Cloud CLI version: 3.2.8
- One-Click Installation
- Step-by-Step Installation