Google ACE Setting Up a Cloud Solution Environment Practice Question
A team is using Cloud Shell to manage resources. They notice that their home directory is persistent across sessions, but they want to ensure that configuration files and scripts are also available after they stop and restart Cloud Shell. What should they do?
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
✓
Store files in the home directory (~)
Cloud Shell's home directory persists 5 GB of data. As long as files are stored in the home directory ($HOME), they will persist across sessions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use gcloud config configurations and save scripts in a Cloud Storage bucket
Why it's wrong here
Using gcloud config configurations lets you manage separate named sets of account, project, and property settings, but it is not a file-storage mechanism for arbitrary scripts or data. Saving scripts to Cloud Storage would require you to manually upload/download them with gsutil each session, which is unnecessary because the home directory already persists automatically. Cloud Shell's built-in persistent home directory serves exactly this purpose without any extra infrastructure or commands.
- ✗
Create a startup script that runs every time Cloud Shell starts
Why it's wrong here
A custom startup script or the Cloud Shell start-up hook executes on every new Cloud Shell VM boot, but it only runs commands inside the current session; it does not make any files persist by itself. Any files created before the VM is recycled would still be lost unless they are written to persistent storage like the home directory. Adding such a script adds complexity and overhead for a problem that is already solved by Cloud Shell's persistent disk.
- ✗
Store files in /tmp
Why it's wrong here
The /tmp directory is backed by local scratch storage attached to the temporary Cloud Shell VM, not by the persistent per-user disk. When the VM instance is recycled after inactivity or a session timeout, all contents of /tmp are erased, so scripts stored there disappear. It may appear stable during a single session but offers no guarantee between sessions.
- ✓
Store files in the home directory (~)
Why this is correct
Cloud Shell automatically mounts a persistent home directory at ~ on a small but durable disk that is attached to your user profile across sessions. Any files, Bash scripts, or gcloud configuration files you place in ~ remain available even when the underlying VM is replaced. This is the intended and simplest way to preserve your work in Cloud Shell, and it also houses the .config directories used by gcloud.
Go deeper
Related to this question
About these practice questions
This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.