Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 was so good with windows, now I’m feeling like a complete idiot.

I have an SSD for ubuntu and want to install the majority of my programs to a separate HDD but I have no clue how.
All searches I have tried only turn up with dual-boot installations.

  • (RESOLVED -> ) I am also having trouble locating "/etc/". Specifically, to modify Conky.
    Searching for this term only turns up instances where people are telling you to access this file, not how to get to it.
share|improve this question
Take a look at This, it'll get you started. – Mitch Jun 27 '13 at 23:04
I was of the impression that everything extended from the home folder. Whoops. That page you linked wasn't helpful regarding my issue, but i'm reading through it now and learning a lot, so thank you. – plaguedoctor Jun 27 '13 at 23:28
I added the mount and fstab tags ; you can do what you're describing by manually setting particular filesystems to mount on particular partitions or drives. – belacqua Jun 27 '13 at 23:54
@belacqua is there any other way than that? I don't just want particular file systems on another drive, I want all file systems of particular programs. That way I can sort them by how intensive they are of my system, having games/virtualbox/etc entirely on my SSD and things like libreoffice/thunderbird entirely on one of the HDDs. – plaguedoctor Jun 28 '13 at 0:07
It's not so easy to determine where a given installation and its files might reside -- see the answers in the link Mitch mentioned. You can use things like symlinks as well, but my recommendation is to start simple. Find an example application, ask a specific question here about it (or modify this one to be less general), and go from there. Or experiment cautiously. – belacqua Jun 28 '13 at 18:22
up vote 7 down vote accepted

There is a major difference between Windows and GNU/Linux. On Windows it is common, that each program together with all the libraries it depends on is installed in a separate folder. This often leads to a lot of wasted disk space due to libraries being installed multiple times, for each program that uses them.

On Linux, programs are installed following the Filesystem Hierarchy Standard (FHS). This means, that the libraries the programs depend on are all installed in a common dedicated location, so that they are usually only installed once, no matter how many programs use them. Also, programs are built in such a way, that they all use the same version of a certain library. This safes disk space (and RAM at runtime), but has the drawback, that one cannot freely install programs on different partitions or hard disks, at least not without editing system configuration files (for instance /etc/ to include the different library folders).

Since the Debian package system was implemented with the FHS in mind, there is afaik no easy way to install Debian packages to a folder different from the one they were intended to be placed in and have them working without manually moving and editing files afterwards. This is, because paths are often hardcoded at compile time. So even if you install a package to a different folder, for instance by using dpkg --instdir=folder/ package.deb on the command line, the program will still look for its configuration in '/etc', not 'folder/etc', but the config files that were shipped with the package of course were installed to 'folder/etc'... Also, by this the program will not be added to the menu, since menu files are supposed to be in '/usr/share applications', not in folder/usr/share/applications.

You can of course manually configure and compile a program from its source code to have it install the binary and data parts wherever you'd like, while still installing configuration files to the FHS compliant locations, but this is something I'd only recommend for advanced users. If you are going to compile from source, have a look at checkinstall, a tool that automatically creates debian packages.

Another option, that was suggested on linuxfromscratch, is to unpack the package to a suitable location and then to create symbolic links to all installed files in the corresponding FHS locations.

Since in the comments you were referring to games: Many games that are not bought through Ubuntu Software Center come as an installer executable, and those can then of course be installed to any folder, usually a subfolder of your home directory. Windows games, which are being run using WINE can also be installed in any directory you want. For wine there exists an environment variable called WINEPREFIX with which you can set up numerous independent WINE folders, each including its own virtual C: drive. Read the WINE man page for more info.

Even if games/programs come as Debian packages, you can look at the package contents in your favorite archive manager. If the game is going to be installed in /opt, you can usually safely install it to a different folder, since /opt is often used as installation location for programs that don't adhere to FHS.

share|improve this answer
Correct and worthy of upvotes O – Rinzwind Jul 16 '13 at 13:46
Nevertheless, it's not complete, since I didn't explain in detail what would be required to get a package installed at an arbitrary location working, which files one would have to edit and which environment variables would need to be set. I'm just afraid that then it'd become a medium sized novel... – soulsource Jul 16 '13 at 13:51
I would not bother. Just mount /etc/ elsewhere. It takes 90% of the disc load from the ssd. – Rinzwind Jul 16 '13 at 13:56

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.