🖥️Using the Terminal
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
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.

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.
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.


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.

Last updated