This page describes how to start a new Google Cloud Shell session.
Before you begin
Select or create a GCP project.
Starting a new session
Click the Activate Google Cloud Shell button at the top of the Google Cloud Platform Console.
A Cloud Shell session opens inside a new frame at the bottom of the console and displays a command-line prompt. It can take a few seconds for the shell session to be initialized.
When you start Cloud Shell, g1-small Google Compute Engine virtual machine running a Debian-based Linux operating system is provisioned for you. Cloud Shell instances are provisioned on a per-user, per-session basis. The instance persists while your Cloud Shell session is active and terminates after a hour of inactivity.
Note, that when Cloud Shell is started, the active project in
Console is propagated to your
gcloud configuration inside Cloud Shell for
GOOGLE_CLOUD_PROJECT, the environmental variable used by
Application Default Credentials library support to define project ID, is also
set to point to the active project in Console.
After you have started Cloud Shell, you can start to use the pre-installed tools and commands immediately from the command line. You can also install additional tools in your home directory in persistent disk storage as needed.
Opening multiple sessions
Click the Add Cloud Shell Session button at the top of the Cloud Shell window to open additional sessions. Each session connects to the same virtual machine instance. When you open a new session, it appears in a new tab at the bottom of the console.
Starting Cloud Shell from the gcloud CLI
If you have Google Cloud SDK installed, you can interact with
Cloud Shell directly from an existing terminal. Using the
gcloud alpha cloud-shell ssh command, you
can establish an interactive SSH session with Cloud Shell. With
gcloud alpha cloud-shell commands, you can also copy files between your local and
Cloud Shell machine via scp, and mount your Cloud Shell directory to your local
file system via sshfs. For more detail,
see the reference documentation for
gcloud alpha cloud-shell.