Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm planning on installing Netbeans 7.2.1 on my Ubuntu 12.10. So far I've already installed JDK 7u11 without any problems and already downloaded Netbeans from Oracle site.

My question is this: Where should I install Netbeans? Should I accept the default /usr/local/netbeans-7.2.1 or should I change this path to my /home?

I'm questioning because someone told me not to install it in the default proposed installation path because later on I’ll be more than likely to run into permissions problems down the line. Working with Netbeans I would not have permissions to write in that folder thus disabling me from adding Libraries to my projects, installing and uninstalling plugins to the IDE, and even with Glassfish server configuration.

I've googled in order to cast a light on my doubts to no avail. The only thing I found was this thread at Netbeans forum which brought even some more doubts.

Can anyone help me?

share|improve this question
up vote 4 down vote accepted

You don't need to run the installer using sudo and you don't need to install it in a system folder, such as /usr/local/. Just run the installer normally and choose to install it in your home directory. If you don't want the netbeans and glassfish folders cluttering up your home folder, you can install them in a sub-folder in your home folder, such as local or Library or whatever.

You will be able to run Netbeans by clicking on the launcher it creates. However, if you want to run it from the command line at all, you will need to add the Netbeans' bin folder to the system path. You can do this by opening your .bashrc file in a text editor and adding this line at the bottom (modified according to where you installed Netbeans):

export PATH=$PATH:~/netbeans-7.2.1/bin
share|improve this answer
Thank you for your enlightenment. Just one more question, if you please, before considering this answer as helpful and correct. When you refer to add my Netbeans' bin folder to my system path, by editing .bashrc file, what file is this? Is this a file from my system or a file existing in one of Netbeans installation folders? – Korrigan Nagirrok Jan 30 '13 at 17:32
It's a file found in your home folder (it will be hidden by default - press Ctrl+H to view hidden folders and files) that sets up the environment variables and the terminal. – iBelieve Jan 30 '13 at 17:37
Thank you very much. – Korrigan Nagirrok Jan 30 '13 at 17:41
You're welcome! – iBelieve Jan 30 '13 at 17:43

If you are going to be the only user on the machine running NetBeans you should not run installer as a root user.

 $ chmod u+x ~/Downloads/
 $  ~/Downloads/

You will be prompted to select installation directory defaulting to the user home. Selected installation folder must be writeable by acting user.

For details check NetBeans Community Wiki.

If you are going to have multiple users launching NetBeans from the same installation then you should run installer as root user and select /user/local as installation directory. It should be default choice when prompted.

The NetBeans IDE is engineered to take in account multiple users launching the IDE from the same installation:

NetBeans accommodates this by keeping each user’s personal settings separate from the NetBeans code installation.

On Unix systems, settings are kept in a local settings directory created in the user’s home directory the first time NetBeans is run.

Above quote is from NetBeans: The Definitive Guide.

share|improve this answer
While I agree with this answer, there might be a downside to the practice of installing software in the user's home: backups (it depends on your backup habits.) If you install software in your home and you do backups of the entire home, then you should remember to exclude the installation directory from the backups; there's no point in backing up something that can be recovered by just reinstalling, if the settings or variable files are stored elsewhere. Netbeans can be installed in /usr/local or /opt and there won't be problems with permissions, as the settings will be in your home. – sierrasdetandil Jan 30 '13 at 18:39
I am afraid that if installed in /usr/local or opt you might need to run IDE as root on updates. – Goran Miskovic Jan 31 '13 at 11:29
There's no need to run the IDE as root, even if it's installed in a system directory. The plugins are stored in $HOME/.netbeans, so they can be installed and updated as a regular user. Only to update the IDE itself there will be need of root access, to run the new installer. – sierrasdetandil Jan 31 '13 at 19:03
Only user installed plugins will go to $HOME/.netbeans. All other plugins will be installed under installation directory. Therefore whenever any of default plugins needs to be updated you will have to run the IDE as a root. Don't forget that for minor releases you will be able to update the IDE using update manager. – Goran Miskovic Jan 31 '13 at 19:22
I think Netbeans copies even the default plugins into .netbeans when they're activated, in $HOME/.netbeans/*/modules/. In several years using it I've always updated all plugins as a regular user. But you're right, to do a complete minor update of the installation you'll have to run it as root. My point is that it's up to the user to choose to install it as regular user or as root; both methods work well. – sierrasdetandil Feb 1 '13 at 13:50

In general, you should install software from the software centre - that way you will get security updates automatically, and it will work without any fiddling or configuration on your part.

share|improve this answer
Thank you for prompt answer. I'm aware of the fact that one should always install software from the software center, the problem is that the version of Netbeans available at the Software Center is quite outdated, it's still Netbeans 7.0 which comes without a series of features – Korrigan Nagirrok Jan 30 '13 at 16:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.