Installing Intellij IDEA on Ubuntu

Posted SmartVessel

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Installing Intellij IDEA on Ubuntu相关的知识,希望对你有一定的参考价值。

he installation on Linux is traditionally more complicated. I wonder why people complain about the low number of Linux desktop users. 技术分享 The IntelliJ IDEA download page mentions only two steps:

  1. unpack the “ideaIU-XX.Y.Z.tar.gz” file using the command “tar xfz ideaIU-XX.Y.Z.tar.gz” and
  2. run “idea.sh” from the bin subdirectory.

However, this instructions don’t deliver IntelliJ as delivered in other platforms. People don’t go to the installation folder and execute the file idea.sh. They either create a desktop icon or add the bin directory to the path, but these steps are missing. So, in my understanding, the installation is not completed. To launch IntelliJ from anywhere in the command prompt:

Become the root user:

sudo -i

Move the unpacked folder to “/opt/idea”:

mv ideaIC-XX.Y.Z /opt/idea

Edit the file .bashrc:

gedit ~/.bashrc

Add the following line to the end of the file:

export PATH=/opt/idea/bin:$PATH

Log out and log in to the change take effect.

To add the launcher icon on the desktop, there is a soft and a hard way.

The Soft Way

Fortunately, IntelliJ can help you once you run it for the first time. In the welcome window, select “Configure”:

技术分享

And then select “Create Desktop Entry”.

技术分享

That’s it!

The Hard Way

As a good Linux user, you may prefer doing it the hard way, as follows:

Create a desktop file:

cd /opt/idea
gedit idea.desktop    

Copy the content bellow to the file:

      [Desktop Entry]
      Name=IntelliJ IDEA 
      Type=Application
      Exec=idea.sh
      Terminal=false
      Icon=idea
      Comment=Integrated Development Environment
      NoDisplay=false
      Categories=Development;IDE;
      Name[en]=IntelliJ IDEA

Install the desktop file:

desktop-file-install idea.desktop

Create a symlink:

cd /usr/local/bin
ln -s /opt/idea/bin/idea.sh /usr/local/bin/idea.sh

Finally, display the idea icon in dash:

cp /opt/idea/bin/idea.png /usr/share/pixmaps/idea.png

At this point, you will finally feel IntelliJ as an application, integrated with the desktop and always ready to be executed.

以上是关于Installing Intellij IDEA on Ubuntu的主要内容,如果未能解决你的问题,请参考以下文章

intellij idea 14.1.5 怎样设置中文

intellij idea怎么更改字体大小

intellij idea 怎么编译erlang

intellij idea 14.1.5 怎么弄中文

请教intellij idea 14安装jrebel破解方法

macOS&&IntelliJ IDEA-IntelliJ IDEA介绍以及IntelliJ IDEA 2019.3新特性