# Create a Linux VM instance in Compute Engine

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

*** ** * ** ***

To follow step-by-step guidance for this task directly in the
Google Cloud console, click **Guide me**:

[Guide me](https://console.cloud.google.com/?walkthrough_id=compute--compute_short_quickstart)

*** ** * ** ***

## Before you begin

1. Enable the Compute Engine API.
   [Enable the Compute Engine API](https://console.cloud.google.com/apis/api/compute.googleapis.com/overview)

## Create a Linux VM instance

1. In the Google Cloud console, go to the **Create an instance** page.

   [Go to Create an instance](https://console.cloud.google.com/compute/instancesAdd)
2. In the **OS and Storage** 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 24.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 VM instance to start. After the VM 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 instance with the
`roles/compute.instanceAdmin` role. Compute Engine also adds that
user to the `sudo` group.

## Connect to the VM instance

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

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

   [Go to VM instances](https://console.cloud.google.com/compute/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.](https://docs.cloud.google.com/static/docs/images/establish-ssh-connection-1.png)

## 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](https://console.cloud.google.com/compute/instances)
2. Select the row containing the VM instance that you've created in this
   tutorial.

3. Click **Delete** , and then click
   **Delete** to confirm.

## What's next

- Work through a tutorial to [set up a basic web server](https://docs.cloud.google.com/compute/docs/tutorials/basic-webserver-apache) on your new instance.
- Work through a [getting started tutorial](https://console.cloud.google.com/start?tutorial=compute_quickstart) in the Google Cloud console.
- Learn how to [create and manage virtual machine instances](https://docs.cloud.google.com/compute/docs/instances/create-start-instance) using the gcloud CLI command-line tool and API.
- Learn more about the [Linux images available on Compute Engine](https://docs.cloud.google.com/compute/docs/images#os-compute-support).
- Learn how to [transfer your files to your instance](https://docs.cloud.google.com/compute/docs/instances/transfer-files).