Use Cloud Shell
This page describes how to start and set up a new Cloud Shell session.
Start a new session
ClickActivate Cloud Shell at the top of the Google Cloud console.
A Cloud Shell session opens inside a new frame at the bottom of theGoogle Cloud console and displays a command-line prompt. It can take a fewseconds for the session to be initialized.
Use the terminal
Cloud Shell provides command-line access to the virtual machineinstance in a terminal window that opens in the Google Cloud console.
In addition to accessing theGoogle Cloud CLI and otherutilities from the command line, you can use thecloudshell command to launchtutorials, open the Cloud Shell Editor, and download files.
Refer to the guide on using theCloud Shell Terminalfor more details.
Use the Cloud Shell Editor
The built-in code editor provides the convenience of viewing and editing filesin the same environment where projects are built and deployed. Launch the Cloud Shell Editor by clicking
Open Editor on the toolbar of the Cloud Shell window.
For more information, seeCloud Shell Editor interface overview.
Choose ephemeral mode
By default, Cloud Shell provisions 5 GB of free persistent diskstorage on your temporarily allocated virtual machine. This is your$HOMEdirectory. When you use the default Cloud Shell experience, thefiles in your home directory persist between sessions.
If you do not need persistent storage, use Cloud Shell in ephemeralmode. In ephemeral mode, you can get started with Cloud Shellfaster because there is less set up and there is no disk attachment or archive.However, this means that all the files you create during your ephemeral modesession are deleted with the VM when the session ends.
To choose ephemeral mode, appendephemeral=true to thehttps://shell.cloud.google.com URL. For example:https://shell.cloud.google.com/?ephemeral=true.
This does not work forhttps://console.cloud.google.com URLs.
Alternatively, you can open the Cloud ShellMore menu, selectEphemeralmode, and clickSave.
To set ephemeral mode as your Cloud Shell default, enableAlwaysstart Cloud Shell in ephemeral mode before you clickSave.
Adjust the display window
To adjust the display window:
Click
Hide or
Restoreto hide or restore the session display.Click
Open Session in New Window to detach the session as a new window.To close the detached window and re-open the session in theGoogle Cloud console, click
Activate Cloud Shell at the top of theGoogle Cloud console window.
To toggle between themes, click
Settings andthen clickSwitch to Light Theme orSwitch to Dark Theme.
What's next
Now that you're familiar with configuring Cloud Shell, you canstart to use thepre-installed tools and commands fromthe command line. You can also install additional tools in yourhome directory inpersistent disk storage as needed.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-24 UTC.