awx

← Blog

Walk-through · 18 November 2026

How to use GNU Octave on awanbox, in your browser

GNU Octave is a free language for numbers, matrices and plots, close to MATLAB. On an awx computer it installs in under a minute and runs in your browser, with nothing to install on your laptop.

This walk-through is a real run on a new computer: install Octave, solve a set of equations, run a script that draws a plot, and open the Octave desktop app. Every screenshot and number below comes from that run.

Awi the cat agent, thinking with a paw on its chin

What you need

Install Octave

Open the computer and go to the Terminal tab. Type:

sudo apt-get update && sudo apt-get install -y octave

On our computer the install itself took 24 seconds, after a few seconds of apt-get update. It installed GNU Octave 8.4.0 and used about 700 MB. You only do this once: Octave stays on the computer when it sleeps.

You can also ask the agent on the Chat tab: “Install GNU Octave on this computer.”

Your first calculations

Make a folder for your work and start Octave in the terminal:

mkdir ~/octave && cd ~/octave
octave-cli

Now solve three equations at once. Type each line and press Enter:

A = [4 -2 1; -2 4 -2; 1 -2 4];
b = [11; -16; 17];
x = A \ b
eig(A)
The awx terminal running Octave 8.4.0: the matrix A and vector b are typed in, x = A backslash b gives 1, -2 and 3, and eig(A) gives 1.6277, 3.0000 and 7.3723
Octave in the Terminal tab. A \ b solves the equations; eig(A) gives the eigenvalues.

A semicolon at the end of a line hides the answer; without it Octave prints it. Type exit to leave Octave.

A script that draws a plot

Most coursework lives in .m files. Save this as projectile.m in ~/octave. Write it with nano projectile.m in the terminal, upload it on the Files tab, or copy it with a file app:

% projectile.m: a ball thrown at 20 m/s and 45 degrees
g = 9.81; v = 20; theta = 45;
t = linspace(0, 2*v*sind(theta)/g, 200);
x = v*cosd(theta)*t;
y = v*sind(theta)*t - 0.5*g*t.^2;
figure();
plot(x, y, "LineWidth", 2); grid on;
xlabel("distance (m)"); ylabel("height (m)");
title("A ball thrown at 20 m/s, 45 degrees");
print("-dpng", "projectile.png");
printf("Range %.1f m, highest point %.1f m\n", max(x), max(y));

Octave needs a screen to draw a plot. Your awx computer has one: its desktop. Tell Octave to use it, then run the script:

export DISPLAY=:0
octave-cli projectile.m
The terminal shows projectile.m, then export DISPLAY=:0, then octave-cli projectile.m prints Range 40.8 m, highest point 10.2 m, and ls -l shows projectile.m and projectile.png
The script prints the answer and saves the plot as projectile.png.

Without export DISPLAY=:0, Octave stops with “print: rendering with fltk toolkit requires visible figure”. It may also print a short warning about a missing font or XDG_RUNTIME_DIR; the plot is fine. This is the picture it saved:

An Octave plot titled A ball thrown at 20 m/s, 45 degrees: a blue arc rising to about 10 m and landing at about 41 m, with a grid and axis labels
projectile.png, as Octave saved it. Download it from the Files tab.

The Octave desktop app

Octave also has a desktop app with an editor, a list of your variables and a file browser, much like MATLAB’s. Start it from the terminal:

export DISPLAY=:0
octave --gui &

Then open the Desktop tab and press Take over to use it. The first time, Octave shows three welcome screens: press Next, leave the box about community news unticked if you like, then Finish. In the Command Window, type cd ~/octave and then projectile to run the script by its name. The plot opens in its own window:

The awx computer's desktop showing the Octave app: the file browser lists projectile.m and projectile.png, the workspace lists the variables g, t, theta, v and x, and a Figure 1 window shows the arc of the ball
The Octave app on the computer’s desktop, in the Desktop tab: the script, its variables, and the plot.

When you leave the Desktop tab, the agent can use the screen again. The Octave app keeps running until you close it.

Add packages

Octave’s extra packages come from Ubuntu, so they install in seconds. For statistics:

sudo apt-get install -y octave-statistics

Load a package in Octave before you use it:

pkg load statistics
normcdf(1.96)

That printed 0.9750 on our computer. Loading the statistics package also prints a warning that it “shadows a core library function”; it is harmless. Other packages work the same way, for example octave-signal, octave-control and octave-symbolic.

Get your work in and out

Common questions

Is GNU Octave the same as MATLAB?

No, but its language is very close, so most MATLAB scripts for coursework run in Octave as they are or with small changes. Octave is free. Some MATLAB toolboxes have no Octave version; many have an Octave package instead.

Do I have to install Octave again every time?

No. Octave stays installed on your computer, with your scripts and plots, when the computer sleeps or you close the page. You install it once per computer.

Why do I get 'print: rendering with fltk toolkit requires visible figure'?

Octave needs a screen to draw a plot. In the awx terminal, run export DISPLAY=:0 first, so plots are drawn on your computer's desktop, and use figure() rather than a hidden figure.

Which computer size should I use for Octave?

Small is enough for Octave in the terminal. For the Octave desktop app and bigger plots, use Large, which has more memory and a desktop that feels quicker.

Cautions

Keep reading

Getting started

Sign in with your Google account, make a computer, and type the install line in its Terminal tab.

Open awx

Awi the cat agent celebrates with confetti

Awi, signing off.

← All posts