0
0
GCPcloud~20 mins

Installing and initializing gcloud in GCP - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Gcloud Initialization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary purpose of the 'gcloud init' command?
After installing the Google Cloud SDK, you run gcloud init. What does this command do?
AIt deletes all existing Google Cloud projects linked to your account.
BIt installs additional Google Cloud services on your local machine.
CIt updates the Google Cloud SDK to the latest version.
DIt configures your local environment by setting up authentication, project, and default settings.
Attempts:
2 left
💡 Hint
Think about what you need to do after installing a tool to start using it.
Configuration
intermediate
2:00remaining
Which command correctly installs the Google Cloud SDK on a Debian-based Linux system?
You want to install the Google Cloud SDK on your Debian-based Linux machine. Which command sequence is correct?
Ayum install google-cloud-sdk
Bapt-get install google-cloud-sdk
Ccurl https://sdk.cloud.google.com | bash
Dpip install google-cloud-sdk
Attempts:
2 left
💡 Hint
The official installation script is often run via curl and bash.
Architecture
advanced
2:00remaining
What happens if you run 'gcloud auth login' without prior 'gcloud init'?
You installed the Google Cloud SDK but skipped gcloud init. You run gcloud auth login to authenticate. What is the expected behavior?
AIt will authenticate and set a default project automatically.
BYou will authenticate successfully, but no default project will be set.
CThe command will fail because the SDK is not initialized.
DIt will automatically run <code>gcloud init</code> for you.
Attempts:
2 left
💡 Hint
Authentication and initialization are related but separate steps.
security
advanced
2:00remaining
Which of the following is a best practice when initializing gcloud on a shared machine?
You are setting up Google Cloud SDK on a shared workstation. Which practice helps keep your credentials secure?
AUse service account keys instead of user credentials for automation.
BUse <code>gcloud auth login --no-launch-browser</code> and manually copy the token.
CStore your credentials in a shared folder accessible by all users.
DRun <code>gcloud init</code> as root user to avoid permission issues.
Attempts:
2 left
💡 Hint
Think about automation and least privilege principles.
service_behavior
expert
2:00remaining
What is the effect of running 'gcloud config set project [PROJECT_ID]' after initialization?
After running gcloud init, you execute gcloud config set project my-project-123. What does this command do?
AIt changes the default project for all subsequent gcloud commands in the current configuration.
BIt creates a new Google Cloud project named 'my-project-123'.
CIt deletes the previously set default project from your account.
DIt logs you out and requires re-authentication.
Attempts:
2 left
💡 Hint
Consider what 'config set' commands usually do.