GNU Octave on Ubuntu

GNU Octave is an interpreted high-level programming language with numerous software features intended mainly for numerical computations. It provides solutions for numerical linear and nonlinear problems and for performing various other numerical experiments with compatible languages such as MATLAB. Octave provides extensive graphical features for visualization and data manipulation. Typically it is used through its interactive command-line interface, but with Octave, you can also create non-interactive programs. Since Octave is very similar to the MATLAB programming language, the programs can be easily transferred.

In this article, we explain how to install GNU Octave on Ubuntu 20.04. We will show you the procedures and commands we have run on the Ubuntu 20.04 system.

Installation of GNU Octave through software manager on Ubuntu 20.04

Most new Linux users don’t want to install software from the command line but prefer to do so from the Software Manager repository. So, on your Ubuntu 20.04 desktop, click Activities in the upper left corner and select the Software icon in the left sidebar as follows:

Software Installer

The following view will be displayed on the system from where you will select the search icon and type Gnu Octave in the search bar. The GNU Octave will display under the search bar as follows:

GNU Octave

Try to install the latest version of every software. Here, at the time of writing this article Octave 5.2.0 latest version is available for installation. You can install it from the Ubuntu software repository.  Click on the install button from the following displayed window to begin the installation of GNU Octave 5.2.0:

Install GNU Octave

The following password authentication dialog box will appear on the screen. As we know that only an authorized Ubuntu user can install any software package on the system. So, you will enter the password and click on the authenticate button as follows:

Authenticate as admin

The installation process will start on your system by displaying the progress bar on the window:

Installation progress

After the successful installation of GNU Octave, you will launch it using the application search bar. For that purpose, click on ‘Activities’ from the desktop and enter the GNU Octave in the application search bar as follows:

GNU Octave Icon

When GNU Octave launches first time on the system, then the following dialog will display on the system:

Welcome to GNU Octave

The above dialog will give you complete information about the Octave configuration file location. Click on the Next button to create the configuration file at the given path. After that, the following dialog box will display:

Connect GNU Octave to website

Through this dialog, if you want to keep connected with the official website of Octave and Community News then you will check or uncheck the option according to your requirement and click on Next as follows:

Installation finished successfully

The above formal dialog box will appear on the system that will guide you on how to access the Octave documentation and support. Click on the Finish now and are ready to use GNU Octave 5.2.0 on your system Ubuntu 20.04. The following working window environment will display on your desktop.

GNU Octave started

GNU Octave has been installed on your system Ubuntu 20.04 using a graphical interface. Now, we will learn how to install GNU Octave through the command line as follows:

Install GNU Octave using snap store

You can install the latest version of GNU Octave using the command line from the snap store. The following steps are involved when you will install GNU Octave using the snap store:

  1. Open the terminal through ‘Ctrl + Alt + t’.
  2. First, you need to update your software package repository using the following command:
$ sudo apt update
  1. Now, you will install snapd using the following command:
Install snapd $ sudo apt install snapd

Using snap you can install any software package on your Ubuntu system. Please make sure all snap paths are enabled on your system. If you having a problem with a snap then restart your system. Now to install the latest version of GNU Octave, type the following command on the terminal:

Install GNU Octave via Snapd $ 

sudo snap install octave

You learned from this article how to install GNU Octave using the command line as well as using GUI through the Ubuntu 20.04 software repository. Hopefully, this article would be helpful for you in the future.

How to Install GNU Octave on Ubuntu 20.04