Managing files with Cloud Shell

This page describes how to view and edit files with Cloud Shell.

Viewing and editing files

Cloud Shell comes with a built-in code editor that allows you to browse file directories as well as view and edit files, with continued access to the Cloud Shell. The code editor is available by default with every Cloud Shell instance, and is based on Theia.

To work with the code editor, follow these steps:

  1. Launch the code editor by clicking the pencil icon Code Editor Button on the toolbar of the Cloud Shell window. This sets up the editor in a new tab with continued access to Cloud Shell.

  2. Use the left-hand pane to browse through the file directories. Use the right-hand pane to view and edit your files.

  3. Access the functionality to toggle the editor and the Cloud Shell window, upload and download files, preview web applications on a Cloud Shell virtual machine instance, and view usage statistics, from the toolbar in the upper right-hand corner.

    Cloud Shell and Editor session

Alternatively, you can open an existing file - for example, README-cloudshell.txt from the environment above - in the code editor, by running the cloudshell command in your Cloud Console as such:

cloudshell edit README-cloudshell.txt