How to Install Eclipse on Ubuntu and Other Linux

A guide to installing the latest version of Eclipse IDE for Java, C++ and PHP on Ubuntu and other Linux distributions.
Warp Terminal

You can always choose to write programs using code editors. It will work for small projects with only a few files.

But if you are considering serious programming or working on a not-so-small project, a normal text editor isn’t going to cut it anymore. You need an IDE (Integrated Development Environment).

Eclipse is one such IDE that is primarily used for C, C++ and Java development. Other languages support can be added on top of an existing installation or they can be installed as separate Eclipse packages.

Eclipse IDE's home screen showing various option available
Eclipse IDE
Make sure you have Java installed on your system. You can follow our guide to install Java on Ubuntu Linux.

Installing Eclipse on Ubuntu and other Linux distros

There are various ways of installing Eclipse on Linux:

  • Use Snap: easiest method but Snap apps are slow
  • Install Eclipse through the official installer
  • Install Eclipse in classic Linux style by keeping the executables in /opt directory

You can go through all three installation process and see which one fits your need.

Method 1: Installing Eclipse using Snap [Easy]

You can install the snap package available for Linux. You can either install it from the terminal or the software centre in Ubuntu.

Open the Software Centre application in Ubuntu, search for Eclipse, and install it from there.

Install Eclipse IDE as a snap application from Ubuntu Software Centre
Install Eclipse as Snap

We also have a guide on using snap packages if you are not sure about the support for snap packages for your Linux distributions.

If you proceed to install it via the terminal, here’s what you have to type in:

sudo snap install eclipse --classic

How to update Eclipse? The snap applications are updated automatically. If a newer version is available through Snap, it will be automatically updated.

How to remove Eclipse? You can look for Eclipse in Ubuntu Software Center and remove it. Alternatively, you can always use the command line:

sudo snap remove eclipse

Method 2: Installing Eclipse using the official installer (for intermediates)

The lauching screen for Eclipse IDE
Eclipse IDE

Eclipse provides an installer that can be used to start the installation process. This is similar to installing applications on Windows.

On the page, you'll see the option to download the installer for Linux. Usually, you would go for x86_64 unless you are using Raspberry Pi.

Eclipse installer download for Linux

Extract the downloaded file. Once extracted, open the folder and run the file eclipse-inst, either by double-clicking or by running the following command inside the extracted eclipse-installer directory:

On Ubuntu Wayland Sessions, the installer loaded weirdly for me. Unable to resize or move the installer window. Opening it under Xorg kind of solved the issue.

Select which IDE you want to install from the list.

From a list of different IDE for different languages, you need to select one, that you need
Select the Programming Language

The next screen will give you an overview of the installation. Press Install to start the installation.

Press the install button to start the installation process of Eclipse IDE
Install Eclipse IDE

It will ask you to accept the license agreement.

The Eclipse Foundation Software User Agreement, that you may need to accept during the installation process
Eclipse Foundation Software User Agreement

It will start the download and installation of the required files.

Screenshot of the Eclipse IDE installer, showing the progres of installtion
Eclipse IDE installation progress
Sometimes, there will be notifications about slow downloads. Wait for some time; the installer will complete it all fine.

And that’s it! Installation is over. You can launch it for the first time directly from the installer.

The installation completion notification along with a button to lauch the IDE. Press the Launch button will open the IDE for the first time.
Launch Eclipse IDE

It will now ask to set up a workspace directory. Set it to your liking and press Launch.

Eclipse IDE Launcher screen, that ask to set the Workspace directory. Set it and press the launch button to open the IDE
Set the Workspace Directory

Now, you just have to search for Eclipse in the app drawer and launch it.

Open the Eclipse IDE fro Ubuntu Activities Overview by searching for it and pressing Enter
Eclipse IDE in Ubuntu Activities Overview

Method 3: Install Eclipse in classic Linux style (for experts)

This section requires good knowledge of the Linux command line.

Make sure you don’t confuse “package” with the installer available. Unlike the installer, this one will give you the complete files for your chosen Eclipse version.

Go to the download page of Eclipse.

Here, go to your desired version of Eclipse. Say, you want to use Eclipse for Java development. Download the Java version for Linux.

Eclipse Java installer for Linux

It is also worth noting that I assume the directory ‘Downloads’ as your default storage path to save the Eclipse package downloaded. If you have a different path, replace the file path from the steps below.

Step 1. Launch the terminal and enter the following command:

cd /opt

Step 2. Next, you have to extract the downloaded package to this directory by entering the following command:

sudo tar -xvzf ~/Downloads/eclipse-jee-*

Step 3. After extracting the files, you have to make a menu entry (so that when you search for Eclipse, an icon will appear in the app drawer).

Here’s what to enter next:

sudo gedit eclipse.desktop

Basically, you are making the file for the shortcut icon here. Next, you need to set up the shortcut to launch Eclipse. So, when the text editor opens, enter the following information and save it (copy-paste what’s written below):

[Desktop Entry]
Comment=Integrated Development Environment

4. Close the text editor and enter the following command to enable the shortcut icon:

sudo desktop-file-install eclipse.desktop

And, that’s it!

Now, you just have to search for Eclipse in the app drawer and launch it.

Eclipse Desktop Shortcut
Eclipse Shortcut

Eclipse all the way

You can run Java programs in the Linux terminal but that is tiresome. Use an IDE like Eclipse and speed up your coding process.

Eclipse is my favorite but there are other IDEs for Java you may explore.

Install IntelliJ IDEA on Ubuntu and Other Linux
This tutorial shows you various ways for installing IntelliJ IDEA on Ubuntu, Linux Mint, elementary OS, Linux Lite and other Linux distributions.

If you are a dark theme fan, you can change the color theme in Eclipse using additional plugins. Enjoy coding with Eclipse.

How to Change Eclipse Color Theme in Linux or Windows
This article demonstrates how to change the color theme in Eclipse by installing Eclipse Color Theme plugin. Eclipse is the preferred IDE for C++, Java, Android, Perl and what not. In my universities, the start up where I interned, the big IT company where I currently work at, Eclipse has

For new Eclipse users, I recommend heading over to the official Eclipse website where you can find all kinds of documentation and guides

If you face any issues with the installation by following my procedure, make sure to let me know in the comments below.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world


Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.