You start a Cloud Shell session and create a file named notes.txt in your home directory. After 12 hours, you reconnect to Cloud Shell. What will happen to the notes.txt file?
Think about where Cloud Shell stores your home directory and how it manages user files.
Cloud Shell provides a persistent home directory that is stored on a disk attached to your user account. This means files you create in your home directory remain available across sessions, even after hours or days.
You want to set your default project for gcloud commands to my-project-123. Which command will correctly set this default project?
Remember the syntax for setting configuration properties in gcloud CLI.
The correct syntax to set the default project is gcloud config set project [PROJECT_ID]. This sets the project property in your active configuration.
You need to run a script that will take 10 hours to complete. You want to use Cloud Shell or gcloud CLI. Which is the best approach to ensure the script runs without interruption?
Consider Cloud Shell session limits and how to run long tasks reliably.
Cloud Shell sessions time out after a period of inactivity (usually 20 minutes). For long-running scripts, it's best to run them on a Compute Engine VM where you control the environment and uptime.
You want to run gcloud commands in Cloud Shell that access multiple projects with different permissions. What is the best way to manage credentials securely?
Think about how gcloud CLI supports multiple configurations for different accounts and projects.
Using gcloud config configurations allows you to create and switch between multiple named configurations, each with its own credentials and settings. This is more secure and organized than storing keys or logging in repeatedly.
Which of the following statements about Cloud Shell resource limits is TRUE?
Recall the typical resource specifications and session behavior of Cloud Shell.
Cloud Shell provides a small VM with about 1.7 GB RAM, limited CPU, and a 5 GB persistent home directory. It is not designed for heavy workloads or unlimited resource use. Sessions also time out after inactivity.