Use 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 ArgumentAlternative nameDescription
help-h, --helpshow cloudshell help
edit-filesedit-file, editOpen specified file in the Cloud Shell Editor
download-filesdownload-file, download, dlInitiate the download of the specified file
aliasesGenerates short aliases for common subcommands

Example usage

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

cloudshell edit $HOME/.bashrc

Similarly, to download your .bashrc file, run:

cloudshell download $HOME/.bashrc

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