google_cloud_sdk_installation_script.sh
· 428 B · Bash
Bruto
# 用 Homebrew 安裝 Google Cloud SDK(適用 macOS)
brew install google-cloud-sdk
# 初始化 gcloud,進行登入與基本設定
gcloud init
# 設定當前使用的 GCP 專案(記得換成你的專案 ID)
gcloud config set project [YOUR_PROJECT_ID]
# 查看目前帳戶底下有哪些 GCP 專案
gcloud projects list
# 查詢目前帳戶下的所有 Compute Engine 虛擬機(VM)
gcloud compute instances list
| 1 | # 用 Homebrew 安裝 Google Cloud SDK(適用 macOS) |
| 2 | brew install google-cloud-sdk |
| 3 | |
| 4 | # 初始化 gcloud,進行登入與基本設定 |
| 5 | gcloud init |
| 6 | |
| 7 | # 設定當前使用的 GCP 專案(記得換成你的專案 ID) |
| 8 | gcloud config set project [YOUR_PROJECT_ID] |
| 9 | |
| 10 | # 查看目前帳戶底下有哪些 GCP 專案 |
| 11 | gcloud projects list |
| 12 | |
| 13 | # 查詢目前帳戶下的所有 Compute Engine 虛擬機(VM) |
| 14 | gcloud compute instances list |
| 15 |