[java] How to install Intellij IDEA on Ubuntu?

I'm new to Ubuntu and Linux in general. I want to code in Java on my computer, but I'm having problems installing IntelliJ IDEA on Ubuntu. I have downloaded and extracted the file and for some reason renamed the folder to idea. I tried moving the folder to /usr/share/applications or something but I didn't have permission. I used sudo -i in terminal to gain permission but didn't manage to get out of root folder. Can anyone help me with a step by step way to move the folder, create a shortcut in the search bar or whatever it's called and install it properly?

This question is related to java linux ubuntu intellij-idea sudo

The answer is


Since Ubuntu 18.04 installing Intellij IDEA is easy! You just need to search "IDEA" in Software Center. Also you're able to choose a branch to install (I use EAP). enter image description here

For earlier versions:

According to this (snap) and this (umake) articles the most comfortable ways are:

  • to use snap-packages (since versions IDEA 2017.3 & Ubuntu 14.04):

    1. install snapd system. Since Ubuntu 16.04 you already have it.

    2. install IDEA snap-package or even EAP build

  • to use ubuntu-make (for Ubuntu versions earlier than 16.04 use apt-get command instead apt):

    1. Add PPA ubuntu-desktop/ubuntu-make (if you install ubuntu-make from standard repo you'll see only a few IDE's):

      $ sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
      
    2. Install ubuntu-make:

      $ sudo apt update
      $ sudo apt install ubuntu-make
      
    3. install preffered ide (IDEA, for this question):

      $ umake ide idea
      

      or even ultimate version if you need:

      $ umake ide idea-ultimate
      
    4. I upgrade Intellij IDEA via reinstalling it:

      $ umake -r ide idea-ultimate

      $ umake ide idea-ultimate
      

You can also try my ubuntu repository: https://launchpad.net/~mmk2410/+archive/ubuntu/intellij-idea

To use it just run the following commands:

sudo apt-add-repository ppa:mmk2410/intellij-idea
sudo apt-get update

The community edition can then installed with

sudo apt-get install intellij-idea-community

and the ultimate edition with

sudo apt-get install intellij-idea-ultimate

TL;DR:

  1. Download IntelliJ IDEA from here.
  2. cd Downloads
  3. extract the downloaded file: sudo tar xf ideaIC-2017.2.5.tar.gz -C /opt/
  4. Switch to the bin directory: cd /opt/idea-IC-172.4343.14/bin
  5. Run idea.sh from the bin subdirectory.

try simple way to install intellij idea

Install IntelliJ on Ubuntu using Ubuntu Make

You need to install Ubuntu Make first. If you are using Ubuntu 16.04, 18.04 or a higher version, you can install Ubuntu Make using the command below:

  1. sudo apt install ubuntu-make

Once you have Ubuntu Make installed, you can use the command below to install IntelliJ IDEA Community edition:

  1. umake ide idea

To install the IntelliJ IDEA Ultimate edition, use the command below:

  1. umake ide idea-ultimate

To remove IntelliJ IDEA installed via Ubuntu Make, use the command below for your respective versions:

  1. umake -r ide idea
  2. umake -r ide idea-ultimate

you may visit for more option.

https://itsfoss.com/install-intellij-ubuntu-linux/


Standalone installation

  1. Download the tarball.tar.gz.

  2. Extract the tarball to a directory that supports file execution.

For example, to extract it to the recommended /opt directory, run the following command:

sudo tar -xzf ideaIC-2020.3.tar.gz -C /opt
  1. Go to /opt folder and open intellij folder

  2. Go to /bin folder and execute the command sh idea.sh

Now the application opened and create the desktop shortcut if you need


Since Ubuntu 16.04 includes snapd by default.
So, the easiest way to install the stable version is

  • IntelliJ IDEA Community:
    $ sudo snap install intellij-idea-community --classic
  • IntelliJ IDEA Ultimate:
    $ sudo snap install intellij-idea-ultimate --classic

For the latest version use channel --edge
$ sudo snap install intellij-idea-community --classic --edge

Here is the list of all channels https://snapcraft.io/intellij-idea-ultimate (drop down 'All versions').

options

--classic

The --classic option is required because the IntelliJ IDEA snap requires full access to the system, like a traditionally packaged application.
[https://www.jetbrains.com/help/idea/install-and-set-up-product.html#install-on-linux-with-snaps]

--edge

--edge Install from the edge channel [http://manpages.ubuntu.com/manpages/bionic/man1/snap.1.html]

Note: Snap, also work a few major distributions: Arch, Debian, Fedora, openSUSE, Linux Mint,...


JetBrains has a new application called the Toolbox App which quickly and easily installs any JetBrains software you want, assuming you have the license. It also manages your login once to apply across all JetBrains software, a very useful feature.

To use it, download the tar.gz file here, then extract it and run the included executable jetbrains-toolbox. Then sign in, and press install next to IntelliJ IDEA:

enter image description here

If you want to move the executable to /usr/bin/ feel free, however it works fine out of the box wherever you extract it to.

This will also make the appropriate desktop entries upon install.


I needed to install various JetBrains tools on a number of machines from CLI, so I wrote a tiny tool to help with that. It also uses cleaner APIs from JB making it hopefully more stable, and works for various JB tools.

Feel free to try it: https://github.com/MarcinZukowski/jetbrains-installer


Recent IntelliJ versions allows automatic creation of desktop entry. See this gist

  1. Launch from commandline. If launching for the first time, setup will ask about creating a desktop launcher icon; say yes. Or else after launching (ie. from the commandline) any time, use the IDEA menu Configure > Create Desktop Entry . That should create /usr/share/applications/intellij-idea-community.desktop
  2. Trigger the Ubuntu desktop search (ie. Windows key), find the Intellij IDEA you used to create the desktop entry.
  3. Drag the icon it's showing into the Ubuntu Launcher.

I find and follow this youtube:

https://www.youtube.com/watch?v=PbW-doAiAvI

Basically, download the tar.gz package, extract into /opt/, and then run the "idea.sh" under bin folder (i.e. /opt/idea-IC-163.7743.44/bin/idea.sh)

Enjoy


In a simple manner you can also try to just run a pre-packaged docker with intellij, I found the good job of @dlsniper : https://hub.docker.com/r/dlsniper/docker-intellij/

you just need to have docker installed and to run :

docker run -tdi \
       --net="host" \
       --privileged=true \
       -e DISPLAY=${DISPLAY} \
       -v /tmp/.X11-unix:/tmp/.X11-unix \
       -v ${HOME}/.IdeaIC2016.1_docker:/home/developer/.IdeaIC2016.1 \
       -v ${GOPATH}:/home/developer/go \
       dlsniper/docker-intellij

Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to linux

grep's at sign caught as whitespace How to prevent Google Colab from disconnecting? "E: Unable to locate package python-pip" on Ubuntu 18.04 How to upgrade Python version to 3.7? Install Qt on Ubuntu Get first line of a shell command's output Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? Run bash command on jenkins pipeline How to uninstall an older PHP version from centOS7 How to update-alternatives to Python 3 without breaking apt?

Examples related to ubuntu

grep's at sign caught as whitespace "E: Unable to locate package python-pip" on Ubuntu 18.04 How to Install pip for python 3.7 on Ubuntu 18? "Repository does not have a release file" error ping: google.com: Temporary failure in name resolution How to install JDK 11 under Ubuntu? How to upgrade Python version to 3.7? Issue in installing php7.2-mcrypt Install Qt on Ubuntu Failed to start mongod.service: Unit mongod.service not found

Examples related to intellij-idea

IntelliJ: Error:java: error: release version 5 not supported Has been compiled by a more recent version of the Java Runtime (class file version 57.0) Error: Java: invalid target release: 11 - IntelliJ IDEA IntelliJ can't recognize JavaFX 11 with OpenJDK 11 Error: JavaFX runtime components are missing, and are required to run this application with JDK 11 ERROR Source option 1.5 is no longer supported. Use 1.6 or later Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 How to configure "Shorten command line" method for whole project in IntelliJ intellij idea - Error: java: invalid source release 1.9 Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle

Examples related to sudo

Composer: file_put_contents(./composer.json): failed to open stream: Permission denied How to run SUDO command in WinSCP to transfer files from Windows to linux How to install Intellij IDEA on Ubuntu? pip install: Please check the permissions and owner of that directory How to use sudo inside a docker container? How to fix 'sudo: no tty present and no askpass program specified' error? npm install errors with Error: ENOENT, chmod npm throws error without sudo Is it acceptable and safe to run pip install under sudo? Command not found when using sudo