I want to choose where on a hard drive the application is stored when installing it via Ubuntu Software Center. I am not looking for a general setting for all applications, but rather I would like to set the exact folder on hard drive where the currently installed applications will be stored. Also is it a problem to store the application to a NTFS partition?
-
wait; I assumed you meant "installed". did you perhaps mean to use a different location where the cache is stored used to save the .deb package? – Rinzwind Apr 10 '14 at 21:36
2 Answers
You can't. Linux (not just Ubuntu) follows the Filesystem Hierarchy Standard where is defined what the logical place is to store files such that we do not have duplicate files on our system. USC does not choose where to install software.The package you install has information on where files need to go.
If you want to store programs on a different place you need to install it from source. While compiling sources you can then tell it to install in /opt or in your /home. And if that is a general idea you want to explore Gentoo could be a better operating system for you.
Also is it a problem to store the application to a NTFS partition?
In general: yes. Windows does not provide functionality for the permissions structure Linux uses.
Where application files are stored on your hard disk is subject to rather strict rules. Debian installer files, including software you install via ppa, the Software Center or Synaptic, will not let you choose where to install. There are good reasons for that. To mention a few:
- Security: Applications should be accessible (in general) for all users. The reverse consequence is that applications should not be installed in locations where unauthorized users can edit the code for example. The directory structure of Linux (and thus Ubuntu) takes very well care of permissions, so that there is a strict set of "layers" from user level on to the kernel. This structure is one of the reasons why Linux is one of the safest OS. NTFS does not support setting permissions like Linux does, so it would not fit in this concept.
- Coherence of your system: To run an application, it takes more than just the binary file of an application. Many applications share libraries and other sources. New applications should be able to find already installed libraries. To make it possible to start an application from the GUI, Dash is reading the contents of desktop files in either
/usr/share/applications
(globally) or~/.local/share/applications
.
That is why these files are stored in fixed locations.
You can however choose your own location if you build the application from source. In some cases, you can use an installer script to install applications locally. If you do either of those, as a general rule, I would suggest to not touch the order of how things are arranged outside your ~/
directory unless you really know what you are doing.

- 83,767