Using the Session Window

This page describes how to use the Google Cloud Shell session window.

Scrolling the display

To scroll the session display:

  • Use your mouse wheel or trackpad while browser focus is on a session tab.

  • Use Ctrl-Shift-PageUp / Ctrl-Shift-PageDn (Windows and Linux) or Fn-Shift-Up / Fn-Shift-Down (on macOS).

Copying and pasting text

To copy and paste text:

  1. Select some text in the session display or another window using your mouse.

  2. Press Ctrl + C (on Windows or Linux) or Cmd + C (on macOS) to copy the text.

  3. Press Ctrl + V (on Windows or Linux) or Cmd + V (on macOS) to paste at your current cursor location.

Sending a key combination using the console

Click the Send Key Combination button Send Key Combination Button and select Ctrl + V to paste the contents of your clipboard at your current cursor location.

Adjusting the display window

To adjust the display window:

  1. Click the Hide Hide Shell Button and Restore Restore Shell Button buttons to hide and restore the session display.

  2. Cick the Open Session in New Window Detach Shell Button button to detach the session as a new window.

  3. Click the Activate Cloud Shell button at the top of the console window to close the detached window and re-open the session in the console.

  4. Click the Settings button Settings Button and then Switch to Light Theme or Switch to Dark Theme to toggle between themes.

Opening multiple sessions

Click the Add Cloud Shell Session Add Session Button button at the top of the Cloud Shell window to open additional sessions. Each session connects to the same virtual machine instance. When you open a new session, it appears in a new tab at the bottom of the console.

Using the Code Editor

The beta version of the Cloud Shell code editor is now available for use. The built-in code editor provides the convenience of editing files in the same environment where projects are built and deployed. To use the code editor:

  1. Launch the code editor by clicking the pencil icon on the toolbar of the Cloud Shell window. This sets up the editor in a new tab with continued access to the 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.

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.

To open and for edit in the code editor, from the Cloud Shell command line, run:

cloudshell edit

Similarly, to download files, run:

cloudshell download

The cloudshell command can also be used to launch a tutorial. To do so, run:

cloudshell launch-tutorial

For more information about the cloudshell command, run cloudshell help in your Cloud Shell session.

Keyboard layout support

Cloud Shell allows you to specify which key behaves as Alt Gr. To specify key mapping, go to the Terminal Settings menu, select Terminal Preferences > Keyboard > Alt Gr Mode and choose one of the following options:

  • Auto - Autodetect based on browser language
  • None - Disable any AltGr related munging
  • Ctrl-Alt - Assume Ctrl+Alt means AltGr
  • Left-Alt - Assume left Alt means AltGr
  • Right-Alt - Assume right Alt means AltGr

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Shell