Starting a Google Cloud Shell
Google Cloud Shell is a browser-based command line shell in the Cloud Console. Cloud Shell provisions a
g1-small Compute Engine VM instance on demand when you start a session. The instance runs the Debian-based Linux operating system. Your home directory in Cloud Shell is backed by 5GB of persistent disk storage allowing you to persist data across sessions. Although Cloud Shell uses cloud resources, it is free to use.
Many common utilities and development runtimes are preinstalled in the default Cloud Shell image. These include Google Cloud SDK components (
kubectl, etc.), Docker, Git, Python, Go, and Node.js. This makes Cloud Shell very convenient for quickly issuing commands from your Cloud Console without any need for SSH and additional authentication. In this lab step, you will see how easy it is to start using Cloud Shell and briefly inspect the environment.
1. Click the Cloud Shell icon in the upper-right corner of the Console:
2. If presented with a summary of Cloud Shell, read through it (or the following image) and click START CLOUD SHELL:
After provisioning and establishing a connection to the VM instance, you are directly logged into a Cloud Shell terminal:
The welcome message explains that you are automatically logged in to
gcloud, the CLI for managing most Google Cloud resources, and the current project has been set to the active project in your Cloud Console. Without Cloud Shell, you would have to run the
gcloud init wizard to authorize and configure
3. Drag the white Cloud Shell title bar up in order to resize the Cloud Shell panel so that at least 20 lines of output can be displayed.
Alternatively, you can open Cloud Shell in a new window by clicking the icon with an arrow in it:
4. List the Google Cloud SDK components by entering:
Copy codegcloud components list
Most of the components are Installed by default.
In this lab step, you started a Cloud Shell session and saw how Cloud Shell automatically configures the Google Cloud SDK for you to use.