G Cloud Switch Account
Switching between accounts in Google Cloud can be done using the gcloud
command-line interface. Here are the steps to switch accounts:
List Credentialed Accounts: First, you can list all the accounts that you have added to your
gcloud
configuration. To do this, use the command:bashgcloud auth list
This command will display all the accounts, with the currently active account marked as
ACTIVE
.Set the Active Account: To switch to a different account, use the command:
bashgcloud config set account `ACCOUNT`
Replace
ACCOUNT
with the email address of the account you want to switch to. For example:bashgcloud config set account example@gmail.com
Switching Between Configuration Sets: If you have multiple configuration sets, each with its own account and project settings, you can switch between them. For instance, to activate a configuration set named
account1
, use:bashgcloud config configurations activate account1
Using Compute Engine Service Account: To switch to a Compute Engine service account, the syntax is slightly different:
bashgcloud config set account <SOMEID>-compute@developer.gserviceaccount.com
Using a Gmail-based Account: If you’re switching to a Gmail-based account, the command is straightforward:
bashgcloud config set account name@gmail.com
These commands allow you to manage multiple Google Cloud accounts easily from the command line. Remember to replace the placeholders with your actual account details or configuration names.
Google Cloud Training Demo Day 1 Video:
Conclusion:
Unogeeks is the No.1 IT Training Institute for Google Cloud Platform (GCP) Training. Anyone Disagree? Please drop in a comment
You can check out our other latest blogs on Google Cloud Platform (GCP) here – Google Cloud Platform (GCP) Blogs
You can check out our Best In Class Google Cloud Platform (GCP) Training Details here – Google Cloud Platform (GCP) Training
Follow & Connect with us:
———————————-
For Training inquiries:
Call/Whatsapp: +91 73960 33555
Mail us at: info@unogeeks.com
Our Website ➜ https://unogeeks.com
Follow us:
Instagram: https://www.instagram.com/unogeeks
Facebook: https://www.facebook.com/UnogeeksSoftwareTrainingInstitute
Twitter: https://twitter.com/unogeeks