> ## Documentation Index
> Fetch the complete documentation index at: https://support.labex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# LabEx Virtual Machine (VM)

> Virtual Machine is the infrastructure of LabEx, providing you with hands-on programming experience.

## VM and Labs

LabEx provides a linux virtual environment for you to complete the labs. When you start a lab, it will automatically create a VM for you.

## What is VM?

VM stands for Linux Virtual Machine. It allows you to experience hands-on operations, get creative, and try the code out.

<img src="https://mintcdn.com/huhuhang/lbTGZZG7azHYkwfT/images/desktop.png?fit=max&auto=format&n=lbTGZZG7azHYkwfT&q=85&s=b909862812ddfa6427b66d55118c1a92" alt="Image" width="960" height="640" data-path="images/desktop.png" />

LabEx's VM provides different interfaces for you to complete the labs.

<img src="https://mintcdn.com/huhuhang/q4ekfuwM7mDVAiiH/images/vm-interface.png?fit=max&auto=format&n=q4ekfuwM7mDVAiiH&q=85&s=5a67f4774055fbbb6c1f3158af8307c3" alt="Image" width="2216" height="1056" data-path="images/vm-interface.png" />

1. [**Desktop**](/en/labex-vm/desktop): A Linux GUI Desktop. You can use it to run GUI applications.
2. [**WebIDE**](/en/labex-vm/webide): A VSCode-like web-based IDE. You can use it to write code.
3. [**Terminal**](/en/labex-vm/ttyd): A command-line interface. You can use it to run commands and write code.

You can switch between different interfaces by clicking the tabs on the top left corner.

<img src="https://mintcdn.com/huhuhang/q4ekfuwM7mDVAiiH/images/vm-tabs.png?fit=max&auto=format&n=q4ekfuwM7mDVAiiH&q=85&s=93beb2a0773854d2409b2b50e22120f7" alt="Image" width="238" height="130" data-path="images/vm-tabs.png" />

Most of the time, LabEx considers the first interface as the most suitable for the current lab. You can also switch to other interfaces if you want to try different ways to complete the lab.

## Restart VM

You can restart the VM by clicking the `Restart` button on the top right corner. It will restart the VM and reset the environment.

There are some cases where you need to restart the VM, such as:

1. The VM is not responding.
2. You want to reset the environment.

## Basic information about VM

LabEx VMs current use the `Ubuntu 22.04` operating system.

The default user is `labex`, who has `sudo` privileges. No password is set for the `root` and `labex` user.

You can use the `sudo` command to run commands as the `root` user.
