How to Create a Linux VM on Google Cloud Platform (GCP)?

Google Cloud Platform, offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, file storage, and YouTube.

In this post, we will be creating a Linux Virtual Machine (VM) instance in Compute Engine and connect to this VM using SSH.


  1. Google Cloud Platform (GCP) Account


Create a New Cloud Project

On the top, click on the project selector. Select an existing project or create a new one. We will create a new project for this demo.

Click on New Project. Give a name and click on Create.

After the project is created. Again, go to the project selector, make sure new project is selected.

Make sure billing is enabled for this new project. To verify, click on Billing from the left side menu.

Click on Manage Billing Accounts.

If your project is linked to the billing account, you are good to go.

For more information on Managing the Billing, refer to the GCP documentation.

Microsoft365 for Business

Enable the Compute Engine API

Go to the home screen of Google Cloud Console and click on APIs and Services.

Click on Enable APIs and Services.

Search for Compute Engine API.

Enable this API.

If you get the below screen, then your API is enabled.

Create a Linux VM Instance

Go to the home screen of Google Cloud Console. Hover over the Compute Engine and click on VM Instances.

Create on Create Instance.

Keep most of the values to default unless you want to change it to specific.

Under Boot disk, click on Change. On the public Image, select Ubuntu and version 20.04 LTS

In order to reduce and cost, I will go with the 2vCPU, 1 GB memory machine type. If your requirement is higher, select the machine type accordingly.

In the firewall check the Allow HTTP traffic.

Finally, click on Create. It takes time to create the instance. When created, it will come under the Instances with Green status.

To connect to this VM, click on SSH. it will open up another window with a command line terminal connected to this VM.

Thank you All!!! Hope you find this useful.

One thought on “How to Create a Linux VM on Google Cloud Platform (GCP)?

Add yours

Leave a Reply

Up ↑