This page describes how to use the Cloud Shell Terminal.
Using 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.
gcloud --help to view the gcloud command-line tool commands available
In addition to accessing the
gcloud command-line tool and other
utilities from the command line, you can use the
cloudshell command to launch
tutorials, open the Cloud Shell Editor, and download files. Run
cloudshell help for more information.
Scrolling the display
In addition to using your mouse while browser focus is on a session tab, you can also scroll using Ctrl-Shift-PageUp / Ctrl-Shift-PageDn (Windows and Linux) or Fn-Shift-Up / Fn-Shift-Down (on Mac OS X).
Copying and pasting text
To copy and paste text:
Select some text in the session display or another window using your mouse.
Press Ctrl + C (on Windows or Linux) or Cmd + C (on macOS) to copy the text.
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 and select Ctrl + V to paste the contents of your clipboard at your current cursor location.
Configuring terminal settings
To adjust your terminal settings, you can set them with the Settings button . With 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.
Opening multiple terminal sessions
Click the Add Cloud Shell Session 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.
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.