Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Install programs to a different location

  1. #1
    Join Date
    Oct 2009
    Beans
    47

    Install programs to a different location

    I have vista and ubuntu dual-booting on my computer. Each OS is on their own small partition and there is a large partition that I intended to use as a shared area to save files and install programs.

    When installing programs on vista, I can simply change the install path to a subdirectory on the large shared partition.

    But how do I do that on Ubuntu? I have been installing programs with synaptic and, as I understand things, all programs get installed to /usr/bin.

    Is there any way to NOT install programs to /usr/bin (install somewhere else)?
    Or, is there a way to change the location of /usr/bin (place it in the shared partition)?

  2. #2
    Join Date
    Feb 2008
    Location
    Decatur, GA
    Beans
    1,157
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Install programs to a different location

    When installing programs on vista, I can simply change the install path to a subdirectory on the large shared partition.

    But how do I do that on Ubuntu? I have been installing programs with synaptic and, as I understand things, all programs get installed to /usr/bin.

    Is there any way to NOT install programs to /usr/bin (install somewhere else)?
    Or, is there a way to change the location of /usr/bin (place it in the shared partition)?
    When installing through synaptic, it's going install to the standard directories. I imagine changing this is somehow possible, but I would think that it's not advisable. Any particular advantage to doing things this way (having the programs use a different install directory)?
    yeats - Ubuntu 13.04

  3. #3
    Join Date
    Oct 2009
    Beans
    47

    Re: Install programs to a different location

    Quote Originally Posted by chrissharp123 View Post
    Any particular advantage to doing things this way (having the programs use a different install directory)?
    Well, the reason I want to do it that way is because I intsalled each of my OS's on small partitions (leaving room for system updates and such). If I keep installing programs on the Ubuntu OS partition, it will fill up fast.

    Also, if I needed to do a fresh Ubuntu install, all my programs would be unafected (no need to download and re-install)

  4. #4
    Join Date
    Feb 2008
    Location
    Decatur, GA
    Beans
    1,157
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Install programs to a different location

    Also, if I needed to do a fresh Ubuntu install, all my programs would be unafected (no need to download and re-install)
    Having a separate /home directory for preserving files (and many settings) is a great way to preserve these through re-installs, but trying to preserve installed programs sounds like trouble to me. You may get some different opinions, but I wouldn't expect this to work the way you're expecting...
    yeats - Ubuntu 13.04

  5. #5
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Install programs to a different location

    Quote Originally Posted by Fabled One View Post
    I have vista and ubuntu dual-booting on my computer. Each OS is on their own small partition and there is a large partition that I intended to use as a shared area to save files and install programs.

    When installing programs on vista, I can simply change the install path to a subdirectory on the large shared partition.

    But how do I do that on Ubuntu? I have been installing programs with synaptic and, as I understand things, all programs get installed to /usr/bin.

    Is there any way to NOT install programs to /usr/bin (install somewhere else)?
    Or, is there a way to change the location of /usr/bin (place it in the shared partition)?
    Actually programs are not installed to any single location. All files are put into different places based on the file's purpose, so the executable files for programs go to /usr/bin, icons and pixmpas into /usr/share/icons and /usr/share/pixmaps, documentation to /usr/share/doc, system-wide configuration files to /etc and so on..

    Since these locations are pretty much a standard there's no easy way to force programs to install into a single location as they usually do in Windows. The system looks for certain files in certain places, and there's no such thing as Windows registry that could be used to define locatiosn of all files belonging to a program.

    ..not that forcing programs to install into single directory would really even make any sense in most cases. If you thought about using the same partition for both Windows and Linux programs it wouldn't work anyway. Windows doesn't have any support for Linux filesystems, while Linux needs certain filesystem features to actually handle the programs. (For example executable files are handled by marking the file as executable, which is a filesystem feature, not by file name extensions like in Windows. Also most Linux programs are pretty strict about ownership and permissions of the program's files, and Windows filesystems are not able to handle those as they are used in Linux/Unix systems.

    edit: There's no easy way to avoid having to reinstall programs after reinstaling the OS, but at least avoiding having to download the programs again is easy. Apt-get caches all installed packages in /var/cache/apt/archives, so all you have to do is backup the files form there, and after reinstalling the OS put the files in some directory and run "sudo dpkg -i *.deb" in that directory to install all of them at once.

    All your personal settings are stored in your home directory so simply backing up your home (or placing it on a separate partition) will always keep your settings.
    Last edited by mcduck; October 11th, 2009 at 01:48 PM.

  6. #6
    Join Date
    Jul 2007
    Location
    UK
    Beans
    17,063
    Distro
    Ubuntu Development Release

    Re: Install programs to a different location

    +1 mcduck. Linux is not windows. Check this out for the file system details.

    http://library.gnome.org/users/user-...ystems.html.en

  7. #7
    Join Date
    Oct 2009
    Beans
    47

    Re: Install programs to a different location

    Quote Originally Posted by chrissharp123 View Post
    Having a separate /home directory for preserving files (and many settings) is a great way to preserve these through re-installs, but trying to preserve installed programs sounds like trouble to me. You may get some different opinions, but I wouldn't expect this to work the way you're expecting...
    Would preserving my /home maintain my compiz settings, for example? So all the window effects and keyboard shortcuts would work after a reinstall?

  8. #8
    Join Date
    Oct 2009
    Beans
    47

    Re: Install programs to a different location

    Cool,

    I never intended on using win apps in ubunutu or ubuntu apps in windows, I just didn't want to assume how much space I needed for either OS. That's why I thought 1 huge shared partition would work.

    But I guess I can't get around the fact that, ubuntu doesn't play nice with ntfs. Oh well.

    I'll maybe do a fresh Ubuntu install when 9.10 comes out, and increase the partition size..


    Thanks for all the help guys.

  9. #9
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Install programs to a different location

    Quote Originally Posted by Fabled One View Post
    Would preserving my /home maintain my compiz settings, for example? So all the window effects and keyboard shortcuts would work after a reinstall?
    Yes, all your personal settings (as in any setting you can change without having to use "sudo" and give your password) will be stored in your personal configuration files, located inside your home directory.

  10. #10
    Join Date
    Oct 2009
    Beans
    47

    Re: Install programs to a different location

    Nice! Thanks again!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •