Performing actions on Google Cloud Platform (GCP) from the command line provides a convenient and efficient way to manage your cloud resources. There are several options available for interacting with GCP using the command line interface (CLI), each offering its own set of features and capabilities. In this answer, we will explore three main options: Cloud SDK (Software Development Kit), Cloud Shell, and Cloud Console.
1. Cloud SDK:
The Cloud SDK is a powerful set of tools that allows developers to interact with GCP services from the command line. It provides a wide range of functionalities, including managing resources, deploying applications, and monitoring services. To get started with Cloud SDK, you need to install it on your local machine and set up the necessary authentication. Once installed, you can use the 'gcloud' command to perform various actions on GCP.
For example, to create a new virtual machine instance, you can use the following command:
gcloud compute instances create INSTANCE_NAME --zone=ZONE --machine-type=MACHINE_TYPE
This command creates a new virtual machine instance with the specified name, in the specified zone, and with the specified machine type.
2. Cloud Shell:
Cloud Shell is a browser-based command line interface provided by GCP. It offers a pre-configured environment with the Cloud SDK and other necessary tools already installed, eliminating the need for local setup. You can access Cloud Shell directly from the GCP Console, making it easily accessible from anywhere.
With Cloud Shell, you can perform the same actions as with the Cloud SDK, but without the need for installation. This is particularly useful when you need to quickly execute commands or troubleshoot issues without setting up your own development environment.
3. Cloud Console:
Cloud Console is the web-based management interface for GCP. While it is not a traditional command line interface, it provides a command-line-like experience through the Cloud Shell feature. In addition to Cloud Shell, Cloud Console offers a graphical user interface (GUI) for managing GCP resources. It allows you to perform various actions by interacting with menus, buttons, and forms.
Cloud Console provides a convenient way to manage your resources visually, especially for users who prefer a graphical interface over the command line. However, it is worth noting that not all functionalities available in the Cloud SDK or Cloud Shell may be accessible through the Cloud Console.
There are multiple options available for performing actions on GCP from the command line. The Cloud SDK offers a comprehensive set of tools that can be installed on your local machine, while Cloud Shell provides a browser-based command line interface with pre-configured tools. Additionally, Cloud Console offers a web-based management interface with a command-line-like experience through Cloud Shell. Each option has its own advantages and can be used based on your specific requirements and preferences.
Other recent questions and answers regarding EITC/CL/GCP Google Cloud Platform:
- How to calculate the IP address range for a subnet?
- What is the difference between Cloud AutoML and Cloud AI Platform?
- What is the difference between Big Table and BigQuery?
- How to configure the load balancing in GCP for a use case of multiple backend web servers with WordPress, assuring that the database is consistent accross the many back-ends (web servwers) WordPress instances?
- Does it make sense to implement load balancing when using only a single backend web server?
- If Cloud Shell provides a pre-configured shell with the Cloud SDK and it does not need local resources, what is the advantage of using a local installation of Cloud SDK instead of using Cloud Shell by means of Cloud Console?
- Is there an Android mobile application that can be used for management of Google Cloud Platform?
- What are the ways to manage the Google Cloud Platform ?
- What is cloud computing?
- What is the difference between Bigquery and Cloud SQL
View more questions and answers in EITC/CL/GCP Google Cloud Platform

