Information for: DEVELOPERS   PARTNERS

Using the terminal in Cloud IDE

The container provided by Cloud IDE includes a command terminal that has access to the Bash shell. You can run commands as the ide user, which owns the project files.

Screenshot showing terminal output in the Cloud IDE

After signing in to Cloud IDE, use any of the following methods to display a command terminal, based on your installed operating system:

  • Press Command + ` (the backquote character).
  • In the admin menu, click Terminal, and then click New Terminal.
  • Press Command+Shift+P to open the command palette, and then click Terminal: Open New Terminal.
  • Press Ctrl + ` (the backquote character).
  • In the admin menu, click Terminal, and then click New Terminal.
  • Press Ctrl+Shift+P to open the command palette, and then click Terminal: Open New Terminal.
  • Press Ctrl + ` (the backquote character).
  • In the admin menu, click Terminal, and then click New Terminal.
  • Press Ctrl+Shift+P to open the command palette, and then click Terminal: Open New Terminal.

Terminal display settings

You can customize the integrated terminal font and line height value by modifying the following settings:

  • terminal.integrated.fontFamily
  • terminal.integrated.fontSize
  • terminal.integrated.fontWeight
  • terminal.integrated.fontWeightBold
  • terminal.integrated.letterSpacing
  • terminal.integrated.lineHeight

To alter any of these settings from their default values, complete the following steps:

  1. Sign in to your Cloud IDE with the ads ide:open command, as described in Getting started.
  2. In the admin menu, click File > Settings > Open Preferences.
  3. Scroll to the Terminal section, and click it to display the settings.
  4. Click the setting you want to alter. The Cloud IDE will display a window containing values you can select.

Terminal key bindings

Cloud IDE contains the following keyboard shortcuts for your use, depending on your installed operating system:

Key Description
Command+C Copy to clipboard.
Command+V Paste from clipboard.
Shift+Page up Scroll the display terminal area up.
Shift+Page down Scroll the display terminal area down.
Shift+Home Scroll to the top of the display terminal area.
Shift+End Scroll to bottom of the display terminal area.
Command+K Clear the terminal display area.
Key Description
Ctrl+Shift+C Copy to clipboard.
Ctrl+Shift+V Paste from clipboard.
Shift+Page up Scroll the display terminal area up.
Shift+Page down Scroll the display terminal area down.
Shift+Home Scroll to the top of the display terminal area.
Shift+End Scroll to bottom of the display terminal area.
Ctrl+K Clear the terminal display area.
Key Description
Ctrl+Shift+C Copy to clipboard.
Ctrl+Shift+V Paste from clipboard.
Shift+Page up Scroll the display terminal area up.
Shift+Page down Scroll the display terminal area down.
Shift+Home Scroll to the top of the display terminal area.
Shift+End Scroll to bottom of the display terminal area.
Ctrl+K Clear the terminal display area.

Running selected text

Using the Run Selected Text feature, you can run a command that’s part of one of your codebase’s files (without running all the other commands contained in the file). To do this, complete the following steps:

  1. Sign in to your Cloud IDE with the ads ide:open command, as described in Getting started.

  2. In the left menu, click the Explorer icon to display the file navigation pane.

  3. Navigate to the file containing the command you want to run, and then click the file name to open it.

  4. In the file, select the command you want to run.

  5. In the admin menu, click Terminal > Run Selected Text.

    Screenshot displaying the Run Selected Text command

The Cloud IDE will attempt to run the text you selected as a command.

The output of running a selected Hello World example

If no text is selected in the active editor, the line currently containing the cursor is run.