Courseiva
Setting Up a Cloud Solution EnvironmenteasyMultiple ChoiceObjective-mapped

Google ACE Setting Up a Cloud Solution Environment Practice Question

Which gcloud command is used to set the default project for a configuration profile?

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 config set project

The command 'gcloud config set project [PROJECT_ID]' sets the default project in the current active configuration. The other commands are for other purposes.

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 it's wrong here

    gcloud init is a bootstrap command that handles full SDK setup, including authentication, selecting or creating a configuration, and optionally setting a default project. It is interactive and may also set properties like region or zone, so it does far more than merely changing the default project. For a quick, non-interactive change to the active configuration, a targeted config set is appropriate instead.

  • gcloud config set project

    Why this is correct

    gcloud config set project PROJECT_ID is the correct command because it updates the core/project property in the active gcloud configuration. This directly sets the default project used by subsequent gcloud commands when no --project flag or CLOUDSDK_CORE_PROJECT environment variable is provided. It is the standard, non-interactive method to change the current default project within a given configuration.

  • gcloud projects set

    Why it's wrong here

    The gcloud projects command group does not include a 'set' subcommand. Available subcommands such as list, describe, create, update, and delete manage the project resources themselves, not local SDK configuration. Running gcloud projects set would return an error because the Cloud SDK does not recognize that command, and it does not affect the default project.

  • gcloud projects list

    Why it's wrong here

    gcloud projects list is a read-only operation that lists the IDs, names, and numbers of projects you have access to. It does not modify any gcloud configuration or environment setting, so it cannot assign a default project. Its purpose is informational—typically to find a project ID, which you would then use with gcloud config set project to change the default.

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 →

How Courseiva writes practice questions · Editorial policy

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.