How to install GNU Octave in Ubuntu – MATLAB (MathWorks) Alternative For Linux

GNU Octave is a high-level programming language, which is primarily for numerical computing. Octave helps linear and nonlinear problems numerically and to help other numerical experiments using language that is more relevant to MATLAB. It can also be used as a batch-oriented language. Being a part of the GNU project, it is free software according to the terms of the GNU General Public License. GNU Octave is written by C, C ++, Fortran and is available in 19 languages.  Octave is one of the major free options in MATLAB, while there are some Scilab and FreeMat. Scilab, however, offers less emphasis on syntactic compatibility with MATLAB than the octave. In this article, we will learn How to install GNU Octave in Ubuntu – MATLAB (MathWorks) Alternative For Linux.

Follow the below steps to install GNU Octave in Ubuntu – MATLAB (MathWorks) Alternative For Linux:

Before starting the installation we have to install the official PPA repository for the GNU Octave application is not a part of the default repository of Ubuntu. So to install the PPA repository refers to the below command.

itsmarttricks@mangesh:~$ sudo add-apt-repository ppa:octave/stable
[sudo] password for itsmarttricks:
More info: https://launchpad.net/~octave/+archive/ubuntu/stable
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Ign:1 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic InRelease
Err:2 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign:3 http://ppa.launchpad.net/aseman/desktop-apps/ubuntu bionic InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://ppa.launchpad.net/audio-recorder/ppa/ubuntu bionic InRelease
Reading package lists... Done

After installing the PPA repository let’s update the packages & repositories of Ubuntu using the below command to take effect.

itsmarttricks@mangesh:~$ sudo apt-get update
Ign:1 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic InRelease
Err:2 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:4 http://ppa.launchpad.net/aseman/desktop-apps/ubuntu bionic InRelease
Hit:5 http://download.virtualbox.org/virtualbox/debian bionic InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:7 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:8 http://ppa.launchpad.net/audio-recorder/ppa/ubuntu bionic InRelease
Get:9 http://dl.google.com/linux/chrome/deb stable Release [943 B]
Hit:10 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease

After the update the packages & repositories we are now ready to install the GNU Octave Application. So use the below command to install the same.

itsmarttricks@mangesh:~$ sudo apt-get install octave
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
aglfn default-jre-headless epstool gnuplot-data gnuplot-qt libaec0 libamd2
texinfo
0 upgraded, 49 newly installed, 0 to remove and 167 not upgraded.
Need to get 78.3 MB of archives.
After this operation, 366 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Ign:1 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 tex-common all 6.09
Ign:2 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 openjdk-11-jre-headless amd64 10.0.2+13-1ubuntu0.18.04.4
Get:2 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 openjdk-11-jre-headless amd64 10.0.2+13-1ubuntu0.18.04.4 [39.5 MB]

As you can see above we have successfully installed the GNU Octave package. To confirm the same reference the below command.

itsmarttricks@mangesh:~$ sudo dpkg -l octave
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================================-=======================-=======================-=============================================================================
ii octave 4.2.2-1ubuntu1 amd64 GNU Octave language for numerical computations

Now to open the application just type the command octave on the shell prompt. Refer to the command below.

itsmarttricks@mangesh:~$ octave

How to install GNU Octave in Ubuntu 18.04 – MATLAB (MathWorks) Alternative For Linux
How to install GNU Octave in Ubuntu – MATLAB (MathWorks) Alternative For Linux

You can also open the GNU Octave Application graphically using search your computer box. Refer to the snapshot below.

How to install GNU Octave in Ubuntu 18.04 – MATLAB (MathWorks) Alternative For Linux
GNU Octave

Also Read – How To Install LibreCAD 2D Design Application On Ubuntu

How To Uninstall GNU Octave In Ubuntu?

For any reason, if you don’t like GNU Octave Application and want to uninstall the application from your system using the following commands.

itsmarttricks@mangesh:~$ sudo dpkg -r octave
[sudo] password for itsmarttricks: 
(Reading database ... 194789 files and directories currently installed.)
Removing octave (4.2.2-1ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...

That’s all, In this article, we have explained the How to install GNU Octave in Ubuntu – MATLAB (MathWorks) Alternative For Linux. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.

Share this:
WhatsApp Channel Join Now
Telegram Channel Join Now
Instagram Channel Join Now

Leave a Comment

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