安装
# 更新软件包索引
sudo apt update
# 安装辅助工具
sudo apt install apt-transport-https ca-certificates gnupg curl
# 导入 Google Cloud 公钥
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
# 添加 gcloud CLI 发行版 URI 作为软件包源
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# 更新软件包索引
sudo apt update
# 安装 gcloud CLI
sudo apt install google-cloud-cli
配置
gcloud init
标签:Google,CLI,sudo,gcloud,apt,google,cloud
From: https://www.cnblogs.com/Undefined443/p/18171340