How to Install IntelliJ IDEA on Ubuntu 24.04, 22.04 or 20.04

Using the command-line terminal, this guide will demonstrate how to install IntelliJ IDEA on Ubuntu 24.04, 22.04, or 20.04 LTS. Explore three different methods: utilizing an APT PPA maintained by Jonas Groeger, a dedicated community member, or alternative package managers like Snapcraft and Flatpak with the Flathub repository.

IntelliJ IDEA is a powerhouse in the realm of Integrated Development Environments (IDEs), designed to elevate the productivity and efficiency of developers. Its user-friendly interface, coupled with an arsenal of features, makes it an indispensable tool for both novice and experienced programmers. From smart code completion that predicts your needs to code analysis that catches errors before they compile on-the-fly, IntelliJ IDEA ensures your development workflow is smooth and uninterrupted. It supports a wide array of programming languages and frameworks, making it a versatile choice for various development projects.

Key IntelliJ IDEA highlights include:

  • Advanced Coding Assistance: IntelliJ IDEA offers predictive suggestions to improve code quality and reduce errors.
  • Seamless Integration: It integrates with leading frameworks and languages, providing a unified development experience.
  • Productivity Boosters: With tools like refactoring and on-the-fly analysis, developers can focus more on logic and less on boilerplate.
  • Extensive Plugin Ecosystem: Customize your environment with thousands of plugins from the JetBrains Marketplace.
  • Cross-Platform Development: Supports development across multiple platforms, including web, mobile, and desktop applications.
  • Version Control Simplified: Integrated version control tools make managing your codebase straightforward.
  • Database Tools and SQL: Offers built-in database tools and SQL support, simplifying data management and operations.
  • Debugging and Testing Facilities: Robust debugging and testing tools help ensure the reliability of your applications.

As we transition to the step-by-step installation guide, keep these benefits in mind to fully leverage IntelliJ IDEA’s capabilities on your Ubuntu system.

Install IntelliJ IDEA on Ubuntu via APT

Update Ubuntu Before IntelliJ IDEA Installation

Before starting the installation process, updating your Ubuntu system is crucial. This ensures that all existing packages are up-to-date and helps avoid any conflicts during IntelliJ IDEA installation:

sudo apt update && sudo apt upgrade

Install Initial Packages For IntelliJ

Next, install essential packages including dirmngr, ca-certificates, software-properties-common, apt-transport-https, curl, and lsb-release. These packages facilitate the addition and management of repositories, secure file transfers, and the execution of other relevant tasks:

sudo apt install software-properties-common apt-transport-https -y

Import IntelliJ IDEA PPA

At this step, integrate the JetBrains Personal Package Archive (PPA) into your system’s repository list, which allows APT to retrieve IntelliJ IDEA directly from JetBrains’ PPA.

Begin by importing the GPG key for the JetBrains repository to verify the authenticity of the packages. The GNU Privacy Guard (GPG), a secure communication tool adhering to the OpenPGP standard, facilitates this process. Importing the GPG key confirms that the repository packages indeed originate from JetBrains:

curl -s https://s3.eu-central-1.amazonaws.com/jetbrains-ppa/0xA6E8698A.pub.asc | gpg --dearmor | sudo tee /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg > /dev/null

Upon successful GPG key import, add the JetBrains PPA to your system’s package source list:

echo "deb [signed-by=/usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg] http://jetbrains-ppa.s3-website.eu-central-1.amazonaws.com any main" | sudo tee /etc/apt/sources.list.d/jetbrains-ppa.list > /dev/null

Refresh APT Package Index Post PPA Integration

Having added a new repository, it’s imperative to refresh the APT package database. This action pulls package details from the recently incorporated JetBrains PPA:

sudo apt update

Now, you’re ready to install the desired version of IntelliJ IDEA—either the Community or Ultimate Edition.

Install IntelliJ IDEA on Ubuntu APT Command

Finalize the installation by installing IntelliJ IDEA. With the system now aware of the IntelliJ IDEA package available through JetBrains PPA, proceed to download and install it using the appropriate APT install command:

Community Edition:

sudo apt install intellij-idea-community

Ultimate Edition:

sudo apt install intellij-idea-ultimate

This command prompts APT to download IntelliJ IDEA and any necessary dependencies and install them onto your system.

Install IntelliJ IDEA on Ubuntu via Snapcraft

Verify Snapcraft Installation

The second method for IntelliJ IDEA installation involves using the Snapcraft package manager. Most Ubuntu desktop systems come with Snapcraft pre-installed unless someone has removed it earlier. Flatpak might offer faster updates for this package than Snapcraft, making new releases available a few weeks earlier.

Enable Classic Snap Support

Some packages in Snapcraft come in “classic” mode, which requires additional configuration. To enable classic snap support and ensure the best compatibility, create a symbolic link by running the following command:

sudo ln -s /var/lib/snapd/snap /snap

Install Core Files

To avoid any conflicts during the installation process, install the necessary core files using the command below:

sudo snap install core

Install IntelliJ IDEA on Ubuntu via Snap Command

Now, you’re ready to install the desired version of IntelliJ IDEA—either the Community, Ultimate, or Educational edition. Choose the appropriate command below to install the edition that suits your needs:

Community Edition:

sudo snap install intellij-idea-community --classic

Ultimate Edition:

sudo snap install intellij-idea-ultimate --classic

Educational Edition:

Snapcraft offers an additional option, IntelliJ IDEA Educational Edition, unavailable through the PPA or Flatpak methods.

sudo snap install intellij-idea-educational --classic

Install IntelliJ IDEA on Ubuntu via Flatpak and Flathub

This section will explore an alternative method to install IntelliJ IDEA using the Flatpak package manager. Flatpak is similar to Snapcraft, offering a universal packaging format for Linux applications. It provides benefits such as more accessible updates, better sandboxing, and app isolation, making it an excellent choice for installing IntelliJ IDEA.

Note: If your system does not have Flatpak installed, please refer to our own guide on How to Install Flatpak on Ubuntu for step-by-step instructions on installing the most recent supported version of Flatpak.

Enable Flathub For IntelliJ IDEA

Before installing IntelliJ IDEA through Flatpak, you must enable the Flathub repository, a primary source for Flatpak applications. To enable Flathub, execute the following command in your terminal:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

This command adds the Flathub repository to your Flatpak configuration, ensuring you have access to various applications, including IntelliJ IDEA.

Install IntelliJ IDEA on Ubuntu via Flatpak Command

With Flathub enabled, you can now install IntelliJ IDEA using the flatpak install command. Run the following command in your terminal:

Community Edition:

flatpak install flathub com.jetbrains.IntelliJ-IDEA-Community -y

Ultimate Edition:

flatpak install flathub com.jetbrains.IntelliJ-IDEA-Ultimate -y

These commands install the desired edition of IntelliJ IDEA from the Flathub repository, providing you with the latest version of the application.

Launching IntelliJ IDEA on Ubuntu via GUI or CLI

This section will discuss two methods to launch IntelliJ IDEA: the command-line interface (CLI) and the graphical user interface (GUI). We will cover launching IntelliJ IDEA installed via apt, Snapcraft, and Flatpak.

CLI Methods to Launch IntelliJ IDEA on Ubuntu

To launch IntelliJ IDEA from the command line, depending on the installation method and version you have installed, follow the instructions below:

APT Launch Commands:

Community Edition:

intellij-idea-community

Ultimate Edition:

intellij-idea-ultimate

Snapcraft Launch Commands:

Community Edition:

snap run intellij-idea-community

Ultimate Edition:

snap run intellij-idea-ultimate

Educational Edition:

snap run intellij-idea-educational

Flatpak Launch Commands:

Community Edition:

flatpak run com.jetbrains.IntelliJ-IDEA-Community

Ultimate Edition:

flatpak run com.jetbrains.IntelliJ-IDEA-Ultimate

GUI Method to Launch IntelliJ IDEA on Ubuntu

To launch IntelliJ IDEA using the graphical user interface, follow these steps:

  1. Open the Activities menu.
  2. Click on Show Applications.
  3. Locate IntelliJ IDEA (the version you installed).
  4. Click on the IntelliJ IDEA icon to launch the application.

Using IntelliJ IDEA frequently, you can create a shortcut for easier access. To do this, right-click the IntelliJ IDEA icon in the applications menu and select Add to Favorites. This will place the application icon on the favorites bar, making it readily accessible whenever needed.

Launching IntelliJ IDEA on Ubuntu Linux
Launching IntelliJ IDEA on Ubuntu Linux.

First-Time Tips with IntelliJ IDEA on Ubuntu

Now that you have successfully installed IntelliJ IDEA on Ubuntu Linux, here are some first-time tips on getting started with the software. These recommendations aim to enhance your experience and productivity while working with IntelliJ IDEA on a Linux-based system. By following these guidelines, you can tailor the IDE to your workflow and make the most out of its comprehensive features.

Note: Although tailored for the Community Edition, some tips might apply to the Ultimate Edition, which boasts additional functionality and features.

General Tips for IntelliJ IDEA on Ubuntu

  • Check for JDK Installation: IntelliJ IDEA requires a Java Development Kit (JDK) to run. Ensure you have a compatible JDK installed by running java -version in your terminal. If not, install it using sudo apt install default-jdk.
  • Increase Memory Allocation: To ensure IntelliJ IDEA runs smoothly, consider increasing the memory allocation. Edit the idea.vmoptions file within the IntelliJ IDEA configuration directory and adjust the -Xms and -Xmx parameters to suitable values.
  • Familiarize Yourself with Keyboard Shortcuts: Learning IntelliJ IDEA’s keyboard shortcuts can significantly boost your productivity. Press Ctrl + Shift + A and type “Keymap” to explore and customize shortcuts.
  • Customize the Appearance: Tailor the IDE to your liking by changing themes, fonts, and color schemes. Access these settings via File > Settings > Appearance & Behavior.

Customizations for a Better Experience

  • Install Additional Plugins: Enhance your development experience by installing plugins. Access the plugin marketplace via File > Settings > Plugins. Consider plugins like Vim Emulation or CodeGlance for added efficiency.
  • Adjust Code Style and Inspections: IntelliJ IDEA allows you to customize code style settings and inspection severity. Navigate to File > Settings > Editor > Code Style and Editor > Inspections to tweak these settings according to your preferences.
  • Enable Version Control Integration: Utilize IntelliJ IDEA’s built-in version control support by configuring it under File > Settings > Version Control. It supports Git, SVN, and Mercurial.
  • Optimize Import Statements: Keep your code clean by optimizing imports. Configure this feature under File > Settings > Editor > Code Style > Java > Imports to organize and remove unused imports automatically.

Performance Optimization Tips

  • Disable Unused Plugins: Deactivate plugins you don’t use to improve IDE performance. This can be done under File > Settings > Plugins.
  • Use Power Save Mode: When you need to conserve system resources, enable Power Save Mode by clicking on the battery icon in the bottom-right corner of the IDE window. This mode reduces background operations.
  • Configure Code Completion Settings: Tailor code completion to your needs for better performance. Adjust these settings via File > Settings > Editor > General > Code Completion.
  • Manage Project Indexing: Project indexing is essential for features like code completion and navigation. However, for very large projects, consider excluding non-essential directories to speed up indexing. This can be adjusted under File > Settings > Project Settings > Directories.

Learning and Support Resources

  • Access the IntelliJ IDEA Documentation: For comprehensive guides and tutorials, visit the official IntelliJ IDEA documentation. It offers a wealth of information for both beginners and advanced users.
  • Join the IntelliJ IDEA Community: Engage with other users and seek advice by joining forums and communities dedicated to IntelliJ IDEA and Ubuntu Linux development.
  • Watch Tutorials: JetBrains, the creators of IntelliJ IDEA, provides a series of video tutorials that cover various aspects of the IDE. These are excellent for visual learners.
  • Utilize Built-In Tips: Don’t overlook the “Tip of the Day” feature, which provides useful insights each time you launch the IDE. It can be a great way to learn new shortcuts and features.

Integrating these tips into your workflow, you can optimize your development environment and harness the full power of IntelliJ IDEA on Ubuntu Linux. Whether you’re adjusting the IDE’s appearance, streamlining your coding process with plugins, or optimizing performance, each adjustment can lead to a more efficient and enjoyable coding experience.

IntelliJ IDEA default user interface on Ubuntu Linux
Default user interface of IntelliJ IDEA on Ubuntu.

Additional IntelliJ IDEA Commands with Ubuntu

Update IntelliJ IDEA

IntelliJ IDEA updates automatically along with your system packages if you use the APT package manager as a desktop user. However, you can manually check for updates using the following terminal command:

sudo apt update && sudo apt upgrade

For Snapcraft users, you can update all your Snap packages using the following command:

sudo snap refresh

If you have installed IntelliJ IDEA using Flatpak, you can update all your Flatpak packages with this command:

sudo flatpak update

Remove IntelliJ IDEA

If you remove IntelliJ IDEA from your system, use the appropriate command based on your installation method.

APT Remove Method For IntelliJ IDEA

Community Edition:

sudo apt remove intellij-idea-community

Ultimate Edition:

sudo apt remove intellij-idea-ultimate

Remember to remove the PPA repository as it’s no longer needed:

sudo rm /etc/apt/sources.list.d/jetbrains-ppa.list
sudo rm /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg

Snap Remove Method For IntelliJ IDEA

Community Edition:

sudo snap remove intellij-idea-community

Ultimate Edition:

sudo snap remove intellij-idea-ultimate

Educational Edition:

sudo snap remove intellij-idea-educational

Flatpak Remove Method For IntelliJ IDEA

To remove IntelliJ IDEA installed via Flatpak, run the following command:

Community Edition:

sudo flatpak uninstall com.jetbrains.IntelliJ-IDEA-Community

Ultimate Edition:

sudo flatpak uninstall com.jetbrains.IntelliJ-IDEA-Ultimate

Closing Thoughts

In this guide, we’ve walked through the steps of installing IntelliJ IDEA on Ubuntu, covering three main methods: using Jonas Groeger’s APT PPA, Snapcraft, and Flatpak with the Flathub repository. We then dived into first-time tips to enhance your experience, touching on general advice, customization options, performance optimizations, and learning resources. Our final recommendation? Take the time to personalize IntelliJ IDEA to fit your workflow—it’s a powerful tool that, when tailored to your needs, can significantly improve your coding efficiency. Remember, the key to mastering any software lies in practice and exploration, so don’t hesitate to dive into the settings, experiment with plugins, and make the IDE your own. Happy coding!

Leave a Comment