0

I am looking to change the directory to which the Ubuntu app store and terminal installs programs.

The main reasons are for the factor that I use a lot of programs and when I add a program to Ubuntu, I tend to add it's repository, so I can get that program's updates. The SSD I am looking into is only 500 GB and the hard drives are 4TBs. And i also am looking to reduce SSD writes so I don't run out of E/P cycles and kill my drive. And I am looking to also have an automatic backup make back ups for programs.

Is there a way to change the install directory to another location, or possibly /home?

0

It looks like the best way to do this would be to mount /usr on another hard drive. To do this, you need to

  1. Create an ext4 partition on your hard drive
  2. Copy the entire contents of /usr onto that partition
  3. Edit your /etc/fstab file to mount that hard drive at /usr during boot
  4. Boot from a LiveUSB and delete /usr from the original hard drive
  5. Reboot

This method was discussed here: http://ubuntuforums.org/showthread.php?t=1617196

Another method would be to copy the contents of /usr to another hard drive, and use symlinks, but you would have to automatically mount the hard drive anyway, so it's not much different: How do I change Software Center's default installation path?

As for moving your /home partition, that's pretty well-documented on the Ubuntu wiki, and the steps are pretty much the same as moving /usr to another hard drive: https://help.ubuntu.com/community/Partitioning/Home/Moving

Regarding your concerns on SSD lifespan, they seem to last longer than most people think. However, just like with HDDs, an SSD could last 10 years, or 3 years, depending on how well it was made. http://www.extremetech.com/computing/184619-how-long-do-modern-consumer-ssds-actually-last-longer-than-youd-expect and http://www.makeuseof.com/tag/hard-drives-ssds-flash-drives-how-long-will-your-storage-media-last/

Did I miss anything?

| improve this answer | |
  • No not really, but can you mask directory's with another one or dose Linux/Ubuntu have a variable equivalent to Windows? – weezle1234 Oct 30 '15 at 2:56
  • I'm not entirely sure what you mean by masking a directory. If you're mounting a second hard drive at /usr, and it has the exact same files as the original hard drive had, Ubuntu should be none the wiser. As far as variable equivalent, there is a wiki page on Environment Variables: help.ubuntu.com/community/EnvironmentVariables – SuperSluether Oct 30 '15 at 13:58
  • As for mask, i am referring to something i saw for android ( sense ubuntu and android use Linux kernel). In a nut shell, all it did was redirect file automaticlt. So if i installed a program the program would go to /lib for example, it would install, say it went to /lib, but is is in a entirely different directory like /home and if that program where to be launched, it would claim to run form /lib but really it came from home. So a redirect, more or less. – weezle1234 Oct 30 '15 at 16:16
  • That would be a symkink. Use 'man ln' in a terminal, or read more here: askubuntu.com/questions/56339/… – SuperSluether Oct 30 '15 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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