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?

- 54,432
- 29
- 203
- 199

- 1,009
- 2
- 10
- 12
-
7Intellij is on the Ubuntu Software Center. Would be a lot easier to install for a beginner. – lhoworko May 08 '15 at 18:59
-
It would be easier to install from the Ubuntu Software Center and IntelliJ installed that way works very well in Ubuntu. It should be noted that IntelliJ IDEA is only available in the default repositories of currently supported versions of Ubuntu for Ubuntu 12.04 and Ubuntu 14.04. – karel Aug 16 '15 at 14:17
-
Since it's only available on the software center through third parties and not Jetbrains itself (and therefore not necessarily updated for new versions of jetbrains software or of ubuntu), it's better to do it the official way, using the toolbox app. See [my answer](https://stackoverflow.com/a/41863492/3817111), which has much fewer steps than the accepted one, and is more user friendly. – Menasheh Feb 19 '18 at 14:42
-
> "it's only available on the software center through third parties" - when I look in the software center it says the developer is 'jetbrains' with a green tick, which implies it's from Jetbrains, no? – Anita W Nov 26 '20 at 11:24
-
I know the question was posted before distribution 16.04 (with snapd) was released, but this answer may be worthwhile for anybody reading it from now on: Just have a look at [the official website](https://www.jetbrains.com/idea/download/#section=linux) with the explicit command lines to type in a terminal. – Olivier Nov 13 '22 at 11:05
12 Answers
Note: This answer covers the installation of IntelliJ IDEA. For an extended script, that covers more JetBrains IDEs, as well as help for font rendering issues, please see this link provided by brendan.
Furthermore, a manual Desktop Entry creation is optional, as newer versions of IntelliJ offer to create it on first startup.
I have my intellij int /opt folder. So what I do is:
- Download Intellij
- Extract intellij to /opt-folder:
sudo tar -xvf <intellij.tar> -C /opt/
(the -C option extracts the tar to the folder /opt/) - Create a Desktop Entry File called idea.desktop (see example file below) and store it anywhere you want (let's assume in your home directory)
- Move the idea.desktop from your home directory to /usr/share/applications:
sudo mv ~/idea.desktop /usr/share/applications/
Now (in a lot) Ubuntu versions you can start the application after the GUI is restarted. If you don't know how to do that, you can restart your PC..
idea.desktop (this is for community edition version 14.1.2, you have to change the paths in Exec= and Icon= lines if the path is different for you):
[Desktop Entry]
Encoding=UTF-8
Name=IntelliJ IDEA
Comment=IntelliJ IDEA
Exec=/opt/ideaIC-14.1.2/bin/idea.sh
Icon=/opt/ideaIC-14.1.2/bin/idea.png
Terminal=false
StartupNotify=true
Type=Application
Edit
I also found a shell script that does this for you, here. The given script in the link installs Oracle Java 7 for you and gives you the choice between Community and Ultimate Edition. It then automatically downloads the newest version for you, extracts it and creates a desktop entry.
I have modified the scripts to fulfill my needs. It does not install java 8 and it does not ask you for the version you want to install (but the version is kept in a variable to easily change that). You can also update Intellij with it. But then you have to (so far) manually remove the old folder! This is what i got:
Edit2
Here is the new version of the script. As mentioned in the comments, breandan has updated the script to be more stable (the jetbrains website changed its behavior). Thanks for the update, breandan.
#!/bin/sh
echo "Installing IntelliJ IDEA..."
# We need root to install
[ $(id -u) != "0" ] && exec sudo "$0" "$@"
# Attempt to install a JDK
# apt-get install openjdk-8-jdk
# add-apt-repository ppa:webupd8team/java && apt-get update && apt-get install oracle-java8-installer
# Prompt for edition
#while true; do
# read -p "Enter 'U' for Ultimate or 'C' for Community: " ed
# case $ed in
# [Uu]* ) ed=U; break;;
# [Cc]* ) ed=C; break;;
# esac
#done
ed=C
# Fetch the most recent version
VERSION=$(wget "https://www.jetbrains.com/intellij-repository/releases" -qO- | grep -P -o -m 1 "(?<=https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/BUILD/)[^/]+(?=/)")
# Prepend base URL for download
URL="https://download.jetbrains.com/idea/ideaI$ed-$VERSION.tar.gz"
echo $URL
# Truncate filename
FILE=$(basename ${URL})
# Set download directory
DEST=~/Downloads/$FILE
echo "Downloading idea-I$ed-$VERSION to $DEST..."
# Download binary
wget -cO ${DEST} ${URL} --read-timeout=5 --tries=0
echo "Download complete!"
# Set directory name
DIR="/opt/idea-I$ed-$VERSION"
echo "Installing to $DIR"
# Untar file
if mkdir ${DIR}; then
tar -xzf ${DEST} -C ${DIR} --strip-components=1
fi
# Grab executable folder
BIN="$DIR/bin"
# Add permissions to install directory
chmod -R +rwx ${DIR}
# Set desktop shortcut path
DESK=/usr/share/applications/IDEA.desktop
# Add desktop shortcut
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=IntelliJ IDEA\nComment=IntelliJ IDEA\nExec=${BIN}/idea.sh\nIcon=${BIN}/idea.png\nTerminal=false\nStartupNotify=true\nType=Application" -e > ${DESK}
# Create symlink entry
ln -s ${BIN}/idea.sh /usr/local/bin/idea
echo "Done."
Old Version
#!/bin/sh
echo "Installing IntelliJ IDEA..."
# We need root to install
[ $(id -u) != "0" ] && exec sudo "$0" "$@"
# define version (ultimate. change to 'C' for Community)
ed='U'
# Fetch the most recent community edition URL
URL=$(wget "https://www.jetbrains.com/idea/download/download_thanks.jsp?edition=I${ed}&os=linux" -qO- | grep -o -m 1 "https://download.jetbrains.com/idea/.*gz")
echo "URL: ${URL}"
echo "basename(url): $(basename ${URL})"
# Truncate filename
FILE=$(basename ${URL})
echo "File: ${FILE}"
# Download binary
wget -cO /tmp/${FILE} ${URL} --read-timeout=5 --tries=0
# Set directory name
DIR="${FILE%\.tar\.gz}"
# Untar file
if mkdir /opt/${DIR}; then
tar -xvzf /tmp/${FILE} -C /opt/${DIR} --strip-components=1
fi
# Grab executable folder
BIN="/opt/$DIR/bin"
# Add permissions to install directory
chmod 755 ${BIN}/idea.sh
# Set desktop shortcut path
DESK=/usr/share/applications/IDEA.desktop
# Add desktop shortcut
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=IntelliJ IDEA\nComment=IntelliJ IDEA\nExec=${BIN}/idea.sh\nIcon=${BIN}/idea.png\nTerminal=false\nStartupNotify=true\nType=Application" > ${DESK}
echo "Done."

- 3,734
- 2
- 18
- 31
-
3if anyone is getting a `tools.jar is not in idea classpath` then you can run this `sudo apt-get install openjdk-7-jdk` – benscabbia Feb 20 '16 at 10:37
-
1I updated the bash script to use a more reliable source for the download URL. You can find a working version here: http://breandan.net/2014/08/18/shell-script/ – breandan Jul 21 '16 at 20:34
-
1
-
2The shortcut command fails for me because of permissions, but Intellij offers to create a desktop entry when I open it anyway. – Karl Sep 23 '17 at 18:36
-
2if you run this stuff, make a link from idea-version to idea, so when getting a new version you just update the link. instead of all files you spill around on your laptop – Alexander Oh Nov 30 '17 at 19:39
-
Updated the script again. It now supports several more IDEs and is less prone to failure. http://breandan.net/2014/08/18/shell-script/ – breandan Jan 19 '18 at 06:39
-
1I had to use `echo -e` to expand all the `\n` in the desktop shortcut – Jakub Bochenski May 21 '18 at 12:08
-
Just noticed that IDEA 2018 will create a desktop shortcut for you – Jakub Bochenski May 21 '18 at 12:10
-
I have updated the script again to make it more interactive, fixed the download URL, and added an option to remove older versions. – breandan Dec 17 '19 at 22:32
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

- 573
- 4
- 13
-
Sadly the PPA install seems to be failing with a 403 error from Jetbrains: https://paste.fedoraproject.org/paste/paucm3IvADhdXeZpzgQyjg – bjmc Sep 21 '17 at 22:55
-
1I guess the problem is the one described in https://phab.mmk2410.org/T249. @bjmc do you (still) use `mmk2410/intellij-idea-community` instead of `mmk2410/intellij-idea`? – Marcel Kapfer Sep 23 '17 at 07:15
-
2I added a package update to the old repository `ppa:mmk2410/intellij-idea-community` which now only transitions to the new repository. The latest version of IntelliJ IDEA will then get installed with the next system update (`sudo apt-get update && sudo apt-get upgrade`). – Marcel Kapfer Sep 29 '17 at 12:56
-
your PPA is surely convenient, but somehow the installation downloaded directly from the JetBrains website has better font rendering than the one obtained from you PPA - any ideas? – xeruf Mar 27 '18 at 19:18
-
@Xerus Technically the version you download manually from JetBrains is exactly the same as the package uses. But I have an idea what the problem could be: based on your comment date I guess that you downloaded version 2018.1, the version of the package however is 2017.3.5. It is possible that the font rendering improved in the latest release, which I will package soon. Could you write another comment if the problem persists with the updated package? – Marcel Kapfer Apr 01 '18 at 20:02
-
This is a better approach, as the app will be managed by Ubuntu Package Manager – Nayef Apr 03 '18 at 13:46
-
no it was already this way in the previous release, nothing about the version. I know that it should technically be the same, but something apparently differs. I'm not yet sure, but it seemed to have issues with the bundled Java runtime. – xeruf Apr 04 '18 at 10:06
-
@Xerus „it seemed to have issues with the bundled Java runtime.“ So you downloaded the version without the JDK? If that's so, it would be an upstream error. – Marcel Kapfer Apr 05 '18 at 12:29
-
its really weird actually. There is a bundled JDK and it works, but selecting it as boot JDK in IDEA doesn't work, it just always silently switches back – xeruf Apr 05 '18 at 13:21
-
Even though the bundled JDK was explicitly selected in config/idea.jdk it kept using the one at JAVA_HOME. The only solution was to unset JAVA_HOME or point it to an invalid path. – xeruf Apr 06 '18 at 09:45
-
Installation now suddenly failed with `mv: the given target at '/opt/intellij-idea-community' is not a directory`. Apparently it installed into `/opt/idea-IC-181.4203.550` but the post-installation-script doesn't know that. Also, now that whole installation directory is owned by root and I have to manually un-root it... – xeruf Apr 08 '18 at 16:37
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:
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.

- 3,560
- 3
- 33
- 48
-
4As of now it's much easier to install/update any Jetbrains software using their Toolbox app. The other really cool part about the Toolbox is if you want to upgrade any Jetbrains software to the latest version. You just need to launch Toolbox app and it will automatically show if any updates are available. – farmbytes Mar 10 '18 at 18:22
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).
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):
install snapd system. Since Ubuntu 16.04 you already have it.
to use ubuntu-make (for Ubuntu versions earlier than 16.04 use
apt-get
command insteadapt
):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
Install ubuntu-make:
$ sudo apt update $ sudo apt install ubuntu-make
install preffered ide (IDEA, for this question):
$ umake ide idea
or even ultimate version if you need:
$ umake ide idea-ultimate
I upgrade Intellij IDEA via reinstalling it:
$ umake -r ide idea-ultimate$ umake ide idea-ultimate

- 397
- 8
- 16
-
2also look at Toolbox App in [next answer](http://stackoverflow.com/a/41863492/5373457) – Дмитрий Кулешов May 18 '17 at 18:10
-
1Give us a link, please, if anybody knows what to do with "not root-owned" error using snap package – Дмитрий Кулешов Nov 30 '17 at 19:38
-
Hmm... I just made `# chown root:root /` and all works fine. I was afraid that system may crash but it didn't :) – Дмитрий Кулешов Jan 04 '18 at 16:34
-
Just keep in mind that snap installs everything as read-only. Thus, if you need to make any manual modifications to IntelliJ config files, it will be painful :) – George Smith Aug 28 '23 at 08:57
TL;DR:
- Download IntelliJ IDEA from here.
cd Downloads
- extract the downloaded file:
sudo tar xf ideaIC-2017.2.5.tar.gz -C /opt/
- Switch to the bin directory:
cd /opt/idea-IC-172.4343.14/bin
- Run
idea.sh
from the bin subdirectory.

- 7,373
- 6
- 36
- 49
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,...

- 4,262
- 5
- 34
- 71

- 3,295
- 4
- 30
- 45
Recent IntelliJ versions allows automatic creation of desktop entry. See this gist
- 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
- Trigger the Ubuntu desktop search (ie. Windows key), find the Intellij IDEA you used to create the desktop entry.
- Drag the icon it's showing into the Ubuntu Launcher.

- 464
- 3
- 17
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

- 188
- 6
-
I just wonder how would you be running the IDE in graphical mode from within the container? – George Smith Aug 28 '23 at 08:59
Standalone installation
Download the tarball.tar.gz.
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
Go to /opt folder and open intellij folder
Go to /bin folder and execute the command
sh idea.sh
Now the application opened and create the desktop shortcut if you need

- 8,831
- 9
- 65
- 77
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:
- sudo apt install ubuntu-make
Once you have Ubuntu Make installed, you can use the command below to install IntelliJ IDEA Community edition:
- umake ide idea
To install the IntelliJ IDEA Ultimate edition, use the command below:
- umake ide idea-ultimate
To remove IntelliJ IDEA installed via Ubuntu Make, use the command below for your respective versions:
- umake -r ide idea
- umake -r ide idea-ultimate
you may visit for more option.

- 734
- 9
- 14
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

- 11
- 1
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

- 4,281
- 1
- 19
- 28