Categories: TutorialsUbuntu

How to Install GNU Octave on Ubuntu

GNU Octave is an open-source, high-level complete programming language. It is compatible with MATLAB and is mostly used for numerical calculations. It has a lot of graphical capabilities for data plotting and visualization. It also aids in the numerical solution of linear and nonlinear problems.

GNU Octave is supported on Linux, BSD, Windows, and macOS. In today’s post, we will be installing GNU Octave on Ubuntu. For the Linux Mint OS, visit the installation of Octave on Linux Mint.

Note: The installation procedures have been demonstrated on Ubuntu 20.04 LTS.

Installing GNU Octave on Ubuntu

We will cover the following ways you can use to install GNU Octave on Ubuntu:

  • Installation through Apt
  • Installation through Snap

Method Installation through Apt

GNU Octave is available in the default repositories of Ubuntu OS. It can be installed through the Apt package manager. Follow the below steps for installing GNU Octave on Ubuntu:

1. First, run the command below to update your sources list.

$ sudo apt update

2. Now install GNU Octave by running this command:

$ sudo apt install octave

After running the installation command, it will ask if you want to continue by providing you with the y/n option. Press y and then press Enter to install GNU Octave.

To verify GNU Octave’s installation, run the command below:

$ octave -v

The output below verifies that GNU Octave’s version 5.2.0 has been successfully installed on our machine.

Method Installation through Snap

You can also install the GNU Octave on your Ubuntu machine through the snap package manager. Follow the below steps for installing GNU Octave on Ubuntu:

1. First, run the command below to update your sources list.

$ sudo apt update

2. Now to install snapd, run this command:

$ sudo apt install snapd

It will then ask if you want to continue by providing you with the y/n option. Press y and then press Enter to install snapd.

3. Then to install GNU Octave, run the command below:

$ sudo snap install octave

This should install GNU Octave on your system.

To verify GNU Octave’s installation, run the command below:

$ octave -v

The output below verifies that GNU Octave’s version 6.4.0 has been successfully installed on our machine.

Launch GNU Octave

To launch GNU Octave from command line, type the below command, and press Enter.

$ octave --gui

You can also launch GNU Octave from the Activities menu. To do so, hit the super key which will open a search bar. Type octave in the search bar. The icon of the GNU Octave application will then appear on your screen. Click it to launch the application.

It will then launch the GNU Octave application on your system.

Uninstall GNU Octave

If for any reason you want to remove GNU Octave, use the method described below:

If you have installed GNU Octave through Apt, run the below command to remove it:

$ sudo apt remove octave

If you are prompted with the y/n option, type the letter y and press Enter. The yum command will then remove Octave from your system.

If you have installed GNU Octave through snap, run the below command to remove it:

$ sudo snap remove octave

In today’s post, we covered the installation of GNU Octave on the Ubuntu machine through two different methods. We have also covered how to uninstall GNU Octave in case you want to remove it from your machine. To know more about Octave, visit GNU Octave official manual.

Ubuntu Server Admin

Recent Posts

Meet the wildlife conservation AI 5G hotspot at MWC Barcelona 2026

From March 2-5 in Barcelona, Canonical will present a working wildlife conservation platform that combines…

16 hours ago

Canonical and Ubuntu RISC-V: a 2025 retro and looking forward to 2026

2025: From RISC-V enablement to real execution  2025 was the year that RISC-V readiness gave…

2 days ago

Unmasking the Resolute Raccoon

You’ve almost certainly seen them… In the forest, rummaging through a dumpster, in poorly aging…

2 days ago

Bad Voltage Season 1 Episode 43: Got The Om On

Jono Bacon, Stuart Langridge and myself present Bad Voltage, in which Bryan is sadly unavoidably…

4 days ago

2011 LinuxQuestions.org Members Choice Award Winners – Thoughts

The polls are closed and the official results are in. You can view the detailed…

4 days ago

Building quantum-safe telecom infrastructure for 5G and beyond

coRAN Labs and Canonical at MWC Barcelona 2026 At MWC Barcelona 2026, coRAN Labs and…

5 days ago