Use the Cloud Shell Terminal

This page describes how to use the Cloud Shell Terminal.

Use the terminal

Cloud Shell provides command-line access to the virtual machine instance in a terminal window that opens in the Google Cloud console. You can open multiple shell connections to the same instance.

To view the gcloud CLI available commands, run gcloud --help.

In addition to accessing the Google Cloud CLI and other utilities from the command line, you can use the cloudshell command to launch tutorials, open the Cloud Shell Editor, and download files.

For more information, run cloudshell help.

Scroll the display

In addition to using your mouse while browser focus is on a session tab, you can scroll by pressing Ctrl+Shift+PageUp / Ctrl+Shift+PageDn (Windows and Linux) or Fn+Shift+Up / Fn+Shift+Down (on Mac OS X).

Copy and paste text

To copy and paste text:

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

  2. To copy the text, press Ctrl+C (on Windows or Linux) or Cmd+C (on macOS).

  3. To paste at your cursor location, press Ctrl+V (on Windows or Linux) or Cmd+V (on macOS).

Send a key combination using the Google Cloud console

Click Send Key Combination Button Send Key Combination and then press Ctrl+V.

Configure terminal settings

To adjust your terminal settings, click Settings Button Settings. In this menu, you can set your Terminal preferences for theme, font type and size, and copy, keyboard and scrollbar default settings.

Keyboard layout support

If you're using an international keyboard or would like to customize your key bindings, Cloud Shell allows you to specify which key behaves as Alt Gr (your modifier key). To specify key mapping, go to the Terminal Settings menu, select Terminal Preferences > Keyboard > Alt Gr Key and choose one of the following options:

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

Additionally, you can set 'Alt is meta' to specify that your alt key should behave as a meta key.

Open multiple terminal sessions

To open additional sessions, click Add Session Button Add Cloud Shell Session at the top of the Cloud Shell window. 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 Google Cloud console.

Tab title customization

Cloud Shell understands xterm escape sequences for setting tab titles. To rename a tab title, set the PS1 environment variable in your .bashrc to your desired configuration and source your .bashrc for the change to take.