How to Install GNU Octave in Linux?

Octave is open-source, free available for many of the platforms. It is actually a High-level Language. It comes up with a text interface along with an experimental graphical interface. It is also used for various Machine Learning algorithms for solving various numeric problems. You can say that it is similar to MATLAB but slower than MATLAB.

We can easily solve operations like Matrix Multiplication, Transpose of a Matrix, or any other operation on Vector and Matrix very easily with just a few lines of code.

Steps to Install Octave on Linux

Step 1: Open the terminal and then add repository for Octave with below command and then press Enter.

sudo apt-add-repository ppa:octave/stable


If you are facing an error for ‘apt-add-repository’ command not found like the below image which means that you have not installed the common properties or dependencies to use this command.


But it can be easily installed with the below command(after this run the previous command).

sudo apt install software-properties-common

Step 2: Now you have added the repository then with below command get all the package information from all configured sources:

sudo apt-get update


Step 3: Install the octave for your system with the below command.

sudo apt-get install octave


Step 4: Now, you have successfully installed octave to your Linux system, launch octave with the octave command.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.