Cloud Shell is an interactive shell environment for Google Cloud Platform that works directly in the browser. Cloud Shell have many commonly used CLI tools installed, including
gcloud. Almost all the tasks/examples in this site can be done in the Cloud Shell, and you don't need to install any CLIs!
After you logged into the Google Cloud console, make sure you have selected a project in the top bar, by clicking Select a project.
From the Select a project dialog, select a Google Cloud Project to use. This will help pre-configure Cloud Shell to use that project as the default project.
On the top right, click the Active Cloud Shell icon.
If it's your first time using Cloud Shell, in the introduction dialog, click Start Cloud Shell to continue. Wait for the Cloud Shell machine to provision (it may take a few minutes).
Make sure your Cloud Shell is configured with the current project, by checking the current Project ID configured for
gcloud config get-value project
Cloud Shell instance itself is ephemeral, but your home directory is persisted and its contents will be carried to your future Cloud Shell sessions. Any data/binaries stored outside of the home directory may be lost.
If you want to install any additional binaries, make sure you store inside the home directory, maybe under a
mkdir $HOME/binecho 'export PATH="$HOME/bin:$PATH"' >> $HOME/.bashrc
When working with Java applications and running heavier workloads in Cloud Shell, it'll be useful to enable Boosted Mode. In the Cloud Shell's More menu, click Boost Cloud Shell.
This will re-provision your Cloud Shell instance and replace the original
e2-small (0.5 vCPU, 2GB of memory) machine type with a larger
e2-medium (1 vCPU, 4GB of memory) machine type.
You can open new Cloud Shell tabs by clicking the + icon.
Cloud Shell comes with common text editing tools, such as
nano. It also has a built-in web-based text editor You can open it by clicking Open Editor.
This will launch an embedded editor where you can open and edit text files easily.
You can switch back to the terminals by clicking Open Terminal.