Quickstart using a Linux VM

Learn how to create a Linux virtual machine (VM) instance in Compute Engine using the Google Cloud Console.


For step-by-step guidance on this task directly in Cloud Console, click Guide me:

Guide me


The following sections take you through the same steps as clicking Guide me.

Before you begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.

  4. In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  5. Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.

  6. Enable the Compute Engine API.

    Enable the Compute Engine API

Create a Linux VM instance

  1. In the Cloud Console, go to the Create an instance page.

    Go to Create an instance

  2. In the Boot disk section, click Change to begin configuring your boot disk.
  3. On the Public images tab, choose Ubuntu from the Operating system list.
  4. Choose Ubuntu 20.04 LTS from the Version list.
  5. Click Select.
  6. In the Firewall section, select Allow HTTP traffic.
  7. To create the VM, click Create.

Allow a short period of time for the instance to start. After the instance is ready, it's listed on the VM instances page with a green status icon.

Compute Engine grants the user who creates the VM with the roles/compute.instanceAdmin role. Compute Engine also adds that user to the sudo group.

Connect to the VM instance

Connect to an instance by using the Google Cloud Console and completing the following steps. You're connected to the VM as the user you used to access the VM instances page.

  1. In the Cloud Console, go to the VM instances page.

    Go to VM instances

  2. In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.

    SSH button next to instance name.

Clean up

To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.

  1. In the Google Cloud Console, go to the VM instances page.

    Go to VM instances

  2. Click the name of the instance you created.

  3. At the top of the instance's details page, click Delete.

What's next