> For the complete documentation index, see [llms.txt](https://help.codegrade.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.codegrade.com/setup-assignment/other-features/using-the-terminal.md).

# Using the Terminal

{% hint style="info" %}
This feature is still in Beta and can be enabled on request. Contact us at <support@codegrade.com> if you are interested in trying it out!
{% endhint %}

Students can now run code interactively, and learn to use the Ubuntu terminal in CodeGrade. As a teacher, you control whether the Terminal is available for an assignment, and what it can access.

## Enabling the Terminal

1. You can enable the Terminal in an assignment’s **General Settings** by clicking on the toggle in the top-right corner of the **Terminal** panel.

<figure><img src="/files/eYYQ6bEvYUoiwZAu9PDV" alt="" width="563"><figcaption><p>Terminal panel in the General settings.</p></figcaption></figure>

2. You’ll see the following options:
   * **Allow internet access**:  students can browse the web from the Terminal. This is on by default.
   * **Allow access to uploaded files in AutoTest**: students can access files uploaded in the ATv2 configuration in the fixtures folder. This is off by default.

A Terminal is specific to a snapshot. If you'd like to change a Terminal's dependencies in the AutoTest configuration, you will have to build and publish a new snapshot.

You can choose the Ubuntu version as well as install dependencies by clicking on “Configure Terminal in AutoTest”. Otherwise default settings will be used, i.e. the latest version of Ubuntu supported by CodeGrade (currently Ubuntu version 26.04).

### Working with files

Files from the Code Editor are mirrored into the Terminal at `~/student`. This directory is read-only: students can't edit or delete these files from the Terminal itself; any changes still need to be made in the Code Editor.

Compiled output and any new files students create must be written somewhere outside that directory. Nothing students write in the Terminal persists once the session ends, and none of it affects the files in the Code Editor.

Files uploaded in an AutoTest configuration are placed in  `~/fixtures`.

## Where students find the Terminal

In the Code Editor, students can access the Terminal by clicking on the icon in the bottom left of the screen.

<figure><img src="/files/0eW1v5MObNoxQDbFI3nn" alt=""><figcaption><p>Terminal icon in the Code Editor.</p></figcaption></figure>

<figure><img src="/files/kXIvhkgikDWEFHbvFnT3" alt=""><figcaption><p>Open Terminal in the Code Editor.</p></figcaption></figure>

The Terminal session is discarded with the editor session, i.e. nothing in the Terminal is saved once the student hands in their work. Closing the tab will reset the Terminal as well.

The Terminal also keeps whichever configuration was active when a student started working, for that entire session. If you change the Terminal settings afterward, students already working aren’t affected until they start a new session.

Students can open up to 5 Terminal tabs by clicking on the "**+"** at the top of the Terminal window. Each tab maintains its own independent terminal session. Tabs are restored when the editor is reloaded, so work isn't lost.&#x20;

<figure><img src="/files/Ey38SnEjhiHGbLBdfCGd" alt=""><figcaption><p>Multiple Terminal tabs open.</p></figcaption></figure>

{% hint style="info" %}
Terminal settings are copied automatically when you import an assignment, so you don’t need to reconfigure them.
{% endhint %}
