Using the cloudshell command

The cloudshell command allows you to accomplish tasks like launching tutorials, downloading files, setting aliases, and opening existing files in the code editor from the Cloud Shell command line.

Available positional arguments for cloudshell are as follows:

Positional Argument Alternative name Description
help -h, --help show cloudshell help
edit-files edit-file, edit Open specified file in the Cloud Shell Editor
download-files download-file, download, dl Initiate the download of the specified file
launch-tutorial Launch the specified tutorial
aliases Generates short aliases for common subcommands

Example usage

To open your .bashrc file for edit in the code editor, from the Cloud Shell command line, run:

cloudshell edit $HOME/.bashrc

Similarly, to download your .bashrc file, run:

cloudshell download $HOME/.bashrc

The cloudshell command can also be used to launch a tutorial. To launch a tutorial about Custom Cloud Shell image creation, run:

cloudshell launch-tutorial /google/devshell/tutorials/custom-image-tutorial.md

To display information about the cloudshell command from your Cloud Shell session, run cloudshell help.