Where to install Eclipse on Ubuntu
If you're like me, accustomed to installing most packages via Ubuntu's package manager, you might be a bit confused as to where to install Eclipse since it should be in a place thats accessible by every user on your system. Sure you can install it in your user home directory but that wouldn't be very tidy.
I extracted part of these instructions from: http://flurdy.com/docs/eclipse/install.html
These instructions assume you've downloaded and extracted the Eclipse tarball:
sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`Then create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipsesudoedit /usr/bin/eclipse
With these contents:
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
Now you can execute Eclipse from anywhere in your bash shell. Check out the original article for generating a desktop icon. In the tarball I downloaded, it didn't come with the icon.xpm that contains the Eclipse icon but no worries for me.
The take-home lesson here is that /opt is meant as a place to install application software packages. The topic is Filesystem Heirarchy Standard (FHS) .. these folks seem to be the standard authority on it:
http://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES
However it's not to say that this standard is the most progressive one we have today. I found GoboLinux to be particularly interesting: http://en.wikipedia.org/wiki/GoboLinux#The_GoboLinux_hierarchy
November 30th, 2011 - 13:34
This was so helpful! Thank You!
May 10th, 2011 - 11:49
Tx! Indeed much tidier than just placing it under the home directory, as I used to do.
March 9th, 2009 - 08:53
I tried this stuff but didn’t work. every time when doing
sudo chmod +x `sudo find eclipse -type d` it says that it misses an argument after “+x”
January 15th, 2012 - 10:49
Great article but it didn’t have evyerhtnig-I didn’t find the kitchen sink!