How to install GNU Octave in Ubuntu?


GNU Octave is software that features a high-level programming language for numerical computation. It can be used for solving linear and non-linear problems numerically, its syntax is largely compatible with MATLAB.

GNU Octave is the best-known alternative to MATLAB. It is available for different operating systems including Windows, Linux, macOS, etc.

In this article, I will discuss how to install and use GNU Octave in Ubuntu Linux.

Features of GNU Octave

  • Free and opensource
  • Compatible with all major operating systems
  • High-level language intended for numerical computations
  • Equipped with graph plotting and visualization tools
  • Can be used to solve linear and nonlinear problems numerically
  • It can run both interactive and batch jobs
  • Largely compatible with MATLAB

How to install GNU Octave on Ubuntu

GNU Octave is available in the official Ubuntu repository you can download it from Ubuntu Software or by using the apt command in your terminal.

Before installing any package on your system make sure the apt package repository is updated –

sudo apt update

Next use the following command to install GNU Octave  –

sudo apt install octave

Press y and then enter if it asks for your confirmation.

You can verify your installation by using the given command –

octave --version

octave version

Open GNU Octave on Ubuntu

Once the installation is successful you can launch the GNU Octave from the Ubuntu activities dashboard. Search Octave and click on the icon that appears as you can see in the image below.

open octave ubuntu

First, you will see the welcome screen, click on next to move. Finally, it will display the user interface of the application as given in the image below.

octave gui

You can also use GNU Octave in command line mode. To access Octave command-line interface simply type the given command in your terminal.

octave-cli

The following image shows the command-line interface of Octave.

You can display a list of command-line options that can be used with the octave command by using  –

octave --help

For more information, you can read the official documentation of GNU Octave.

How to remove GNU Octave from Ubuntu

Now for any reason, if you want to remove GNU Octave from your Ubuntu system then use –

sudo apt remove octave -y

Remove any unused dependencies that are left in your system by using-

sudo apt autoremove

Conclusion

I hope you have successfully set up Octave and are able to use it in your Ubuntu system. Now if you have a query or suggestion then write us in the comments below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.