views:

273

answers:

8

I'm a newbie to Linux systems and recently I started using Ubuntu 10.04. When I do java development in Windows, I usually keep my project files under some drive (D: for example) and under my development folder, such as D:\projects\myproj. But I'm bit confused with Ubuntu's folder structure. So, I just want to know how do you organize your projects in Ubuntu? Under which folder do we keep our projects file?

+1  A: 

Wherever you are comfortable with. e.g. /home/yourAccount/projects/yourProj

David Dorward
A: 

I keep them in my home folder under a work subdirectory. My default workspace directory for Eclipse is /home/tiwe/work/workspace

Use symlinks for shortcuts

Timo Westkämper
+9  A: 

You can do anything you want, but typically if you develop in a directory that is not under your home directory, you'll probably need administrator (root) permissions to set up the directories. Another reason to use a sub-directory under your home directory is that in larger companies, the home directories are often stored on a separate file server, which is backed up on a regular basis.

I usually create a directory workspace in my home directory, and then create project directories under that. Other developers may use src or projects.

Craig Trader
+1. My personal pick is actually `$HOME/usr/src`. Because I compile and install some software manually from tarballs, it is easier to have the whole /usr hierarchy mirrored under $HOME.
Dummy00001
Most software packages that you can build will take `--prefix $HOME` which will put things in `$HOME/bin`, `$HOME/lib`, etc. I've needed to do that for some hosting companies.
Craig Trader
+1  A: 

I've setup a different mount point to store user profiles. That way, even if the OS wont reboot after an update (I tend to use Alpha builds) user profiles are left intact.

I'm not sure how to do this after the installation procedure however, sorry.

Adam Asham
+6  A: 

On Unix-like operating systems (including Ubuntu, other Linux distributions, Mac OS X, Solaris, FreeBSD, etc.), you normally store everything under your home directory (typically /home/username in Ubuntu and many other Unix-like OSes, where username is ofcourse your username); not in an arbitrary folder in the root of your filesystem like you do in Windows.

Unix-like operating systems are multi-user systems at heart, unlike Windows, which is a single-user system at heart - that's why you're supposed to store all your own stuff only under your own home directory.

For example, make a folder /home/username/projects/myproj for your project.

To learn more about the Ubuntu directory structure, see LinuxFilesystemTreeOverview in the Ubuntu Community documentation.

Jesper
A: 

I would just use Eclipse, go into the software installer for Ubuntu and find Eclipse under the programming section.

Gnarly
A: 

I suggest Eclipse, like above, if you're looking for a perfect IDE.

I keep my main workspace in the home folder, then create projects, following the wizard (creates folders).

Dario
A: 

As other have stated, private stuff typically goes in your $HOME directory and I create all my projects under /home/pascal/Projects/. I then import them from there into an IDE. In other words, I don't store anything in Eclipse's workspace folder (I don't want to rely on anything IDE specific and I actually may use more than one IDE for my projects).

If really you want to use a separate partition (other than the one hosting /home), you can do so and mount it (typically under /mnt) and create a directory tree for your projects (and set user and group permissions, depending on the file system used). But I don't really see the point unless you're running out of space in your home, the other partition is faster or has a different backup policy.

Pascal Thivent