Google ACE Setting Up a Cloud Solution Environment Practice Question
A new engineer needs to set up the gcloud CLI on their local machine and authenticate with a user account. Which command should they run after installing the SDK?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gcloud init
The 'gcloud init' command initializes the SDK, sets properties, and runs auth login. Alternatively, 'gcloud auth login' only authenticates without setting project/defaults.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
gcloud init
Why this is correct
gcloud init is the intended bootstrap command for a new user because it performs the entire initial setup in one interactive flow: authenticating your Google account via the browser, then prompting you to choose or create a default project and set a default compute region/zone. It writes the resulting credentials and configuration properties into the active gcloud configuration file, leaving your environment ready for immediate use. This one-command workflow is exactly why it's the recommended starting point on a fresh workstation.
- ✗
gcloud auth application-default login
Why it's wrong here
gcloud auth application-default login obtains Application Default Credentials (ADC) for locally running applications that use Google Cloud client libraries, not credentials for the gcloud CLI itself. It stores the credentials in a separate well-known location (often ~/.config/gcloud/application_default_credentials.json) that the gcloud command does not use for its own API calls. Since it neither authenticates the gcloud CLI user nor initializes project/region settings, it is not a substitute for the initial setup command.
- ✗
gcloud config set account
Why it's wrong here
gcloud config set account only switches which already-authenticated account is treated as active within an existing gcloud configuration. It assumes valid credentials for that account are already stored locally and triggers no authentication workflow, so on a new machine without refresh tokens it would simply fail or leave gcloud unable to authorize API requests. This command is meant for administrators managing multiple accounts after setup, not for bootstrapping a new engineer's local environment.
- ✗
gcloud auth login
Why it's wrong here
gcloud auth login authenticates your user account to the gcloud CLI and saves the resulting credentials, but it stops there—it never sets a default project, region, or zone. After running it, a new engineer would still need to separately pick a project with gcloud config set project and configure the compute region, making the setup incomplete and prone to errors. Because it is only a partial step, it is not the correct command for initial gcloud installation and configuration.
Go deeper
Related to this question
About these practice questions
Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.