> 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" %}
The Terminal is ready in your Advanced courses. Contact us at <support@codegrade.com> if you are interested in upgrading to Advanced course!
{% 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="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2FqbpuF0tLTtkHUCZ1yhBK%2FScreenshot%202026-07-30%20at%2012.04.28.png?alt=media&amp;token=58bdc20f-c3b2-496f-a6a5-c758046f41e1" 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`. Students can create files and folders in `~/student` from the Terminal, so compiling and running code works where the code lives (for example `javac Main.java` or `gcc main.c -o main`, then `./main`). Students can also rename, delete and `chmod` the files they create there.

The files that come from the Code Editor are read-only in the Terminal. To change them, students edit them in the Code Editor. Trying to write to, rename or delete one from the Terminal gives a “Permission denied” error.

{% hint style="warning" %}
**Files created in the Terminal are not part of the submission.** They don’t appear in the Code Editor’s file list, aren’t handed in and aren’t seen by AutoTest. Any file that needs to be graded has to be created in the Code Editor.

Files created in the Terminal are available in all Terminal tabs and are still there after a reconnect. They are removed when the editor session ends.
{% endhint %}

If a student creates a file in the Code Editor with the same name and location as a file made in the Terminal, the Code Editor version replaces the Terminal file and its contents are lost. Symbolic links and hard links aren’t supported.

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="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2FGCU5qZWvkdEcU9qwGxHI%2FScreenshot%202026-07-30%20at%2012.05.21.png?alt=media&amp;token=f4be1959-8d36-4190-aaea-43442c328995" alt=""><figcaption><p>Terminal icon in the Code Editor.</p></figcaption></figure>

<figure><img src="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2F0zq3ycjKhrYpbi0JEaIn%2FScreenshot%202026-08-06%20at%2015.36.51.png?alt=media&amp;token=09dd25a1-a192-448c-aad9-2d249d820ef7" 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 a Terminal tab ends that tab’s session, but files created in the Terminal stay available in the other tabs until the editor session ends.

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="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2Fow3c0ouQzGSZ9uwE24CT%2FScreenshot%202026-08-06%20at%2015.38.56.png?alt=media&amp;token=33d49133-f79b-4e8d-ae30-f7a27e0c8f3b" 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 %}
