Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 45 ยท Getting Started

Console and Cloud Shell

Tour the Google Cloud console, use Cloud Shell and the Cloud Shell Editor in your browser, learn navigation shortcuts, and see how a CLI parser works.

The Google Cloud console is the web application where you create and inspect resources with clicks. Cloud Shell is a command line in the same browser tab, already signed in and ready to run gcloud, so you can follow tutorials without installing anything. Together they are the fastest way to start.

This lesson tours both, shows how to move around quickly, and explains where files live in Cloud Shell. Because it needs a real account, the console and shell parts are read-only here. The runnable part is a stand-in for something every command-line tool does: turning text such as --zone=us-central1-a into structured data.

A tour of the console

Where things are

Top bar Project picker, search, Cloud Shell, notifications.
Navigation menu All products, grouped by family.
Pinned products Keep your most-used pages on top.
Dashboard Project info, billing and activity.

Always check the project picker before you click Create.

1 / 2

The details you will use daily:

  • Project picker (top left): shows the active project. Most mistakes, such as creating a VM in the wrong project, start here. See Projects and the Resource Hierarchy.
  • Search bar (top center): type a product name, a resource name or even an action; pressing / focuses it. It is usually quicker than the menu.
  • Navigation menu (the hamburger icon): lists every product. You can pin the ones you use and hide the rest.
  • Cloud Shell button (top right): opens a terminal at the bottom of the page.
  • Notifications (bell): long-running operations such as creating a database report here.
  • Billing: reports and budgets are in the Billing section (Account, Free Tier and Billing Setup).

Many pages offer an Equivalent command line or Equivalent REST link before you press Create. It shows the exact gcloud command for what you configured in the form, which is one of the best ways to learn the CLI and to script repeat work.

The console changes its layout from time to time, so if a button has moved, use the search bar rather than hunting through the menu.

Cloud Shell

Cloud Shell gives you a temporary Linux virtual machine in Google's cloud, shown as a terminal in your browser. Key facts:

  • It comes with gcloud, git, docker, common editors, language runtimes and other tools preinstalled.
  • You are already authenticated as the account you used to sign in to the console, and your current project is pre-selected.
  • Your home directory ($HOME) has a small persistent disk, around 5 GB, that survives between sessions. Everything outside $HOME is reset when the machine is recycled.
  • The machine itself is temporary: it stops after a period of inactivity and its installed extras vanish. Put important files in $HOME or, better, in Git or Cloud Storage.
  • Usage is subject to weekly limits and policies; check the current documentation for specifics.
  • It is meant for administration and learning, not for hosting a production service.

Start with a few safe commands:

Terminal
gcloud auth list                       # which account am I?
gcloud config list                     # which project, region and zone are set?
gcloud config set project PROJECT_ID   # change the default project
pwd; ls                                # you start in your persistent home directory

If gcloud config list shows no project, many commands fail with a message about a missing project. Setting one fixes it. More on configurations in The gcloud CLI.

Web preview and uploads

Cloud Shell can run a small web server and show it through Web Preview on a temporary secure URL that only you can open. You can also upload and download files from the three-dot menu. This is handy for trying a sample app before deploying it to Cloud Run.

Cloud Shell Editor

Cloud Shell Editor is a VS Code-style editor that opens in the same tab (the Open Editor button). It edits the same home directory as the terminal, so you can write app.py in the editor and run it in the terminal below. It includes syntax highlighting, a file tree, Git support and extensions for Google Cloud. For quick edits you can also use nano or vim in the shell.

Console or CLI?

Use the console when Use the CLI when
You are exploring and learning You need to repeat a task
You want to see graphs and relationships You want it in a script or a README
You are unsure which options exist You know the exact command

Experienced teams eventually move from both to infrastructure as code (Infrastructure as Code with Terraform), but clicking first and then reading the "equivalent command" is a gentle path.

A stand-in command-line parser

Every CLI, including gcloud, must split the text you type into positional words and flags. The Node program below is not gcloud's real parser (that is far more capable); it is a small model that handles --flag=value, --flag value and boolean flags. It runs on the site's Node runner and prints exactly what it parsed.

Node.js Parse gcloud-style arguments

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

Notice that --allow-unauthenticated has no value, so it becomes true. The flag names above are real gcloud flags, but only the parsing is simulated here; nothing is created.

Node.js Explain the command from its words

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

The real CLI also offers built-in help: add --help to any command, or run gcloud help.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What survives between Cloud Shell sessions?

    Cloud Shell keeps a small persistent disk for $HOME. The rest of the temporary machine is reset, so keep important files in $HOME, Git or Cloud Storage.
  2. 2. What does the "Equivalent command line" link on a console create page show?

    It translates your form choices into a gcloud command, which is a great way to learn the CLI and to script repeated work.
  3. 3. Cloud Shell is suitable for which of these?

    It is an on-demand admin and learning environment, temporary and subject to usage limits, not a place for production services.
  4. 4. Before pressing Create in the console, what should you check first?

    Resources are created in the active project, so a wrong selection can create things (and costs) in the wrong place.

Summary

  • The console is the browser UI; use its search bar and project picker constantly.
  • Cloud Shell is a temporary, pre-authenticated terminal with gcloud and common tools; only your home directory persists.
  • Cloud Shell Editor edits the same files, and Web Preview lets you test a local web server.
  • "Equivalent command line" links turn clicks into reusable gcloud commands.
  • CLIs parse text into positional words and flags, which our stand-in demonstrated.

Next: The gcloud CLI