I installed an application (Matlab) in it's default location /usr/local/MATLAB a symlink to the executable was created by the installer itself in /usr/local/bin I then notice that my root partition is quite small and I'd like to move the application in the home partition.

Would be possible to do so creating a symlink to the old location pointing at the new?

  • Is everything installed in a single directory such as /usr/local/matlab ? Or is it spread across various parts of /usr/local ? – Stephen Harris Jul 4 '16 at 12:45
  • Yes, I edited the question. The installation path is `/usr/local/MATLAB' as far as I know everything is in there – Crysis85 Jul 4 '16 at 12:48

Unless the program specifically checks for things, you should be able to do

# mv /usr/local/MATLAB /disk2/MATLAB
# ln -s /disk2/MATLAB /usr/local

And everything should continue working as normal.

Indeed on my home machines I do this for the whole of /usr/local (I symlink it to /datadisk/local) so I can upgrade my root disk OS without impacting the software installed!

  • Just mount the new fs on /usr/local if you can afford to dedicate an entire fs to it. – Satō Katsura Jul 4 '16 at 13:01
  • In my case /datadisk also holds /home -> /datadisk/home and other stuff :-) – Stephen Harris Jul 4 '16 at 13:07
  • Going on a tangent: /home should always have its own fs. At the very least, you could then upgrade the system to your heart's content without worrying about people's files. But there are other advantages, such as keeping "creative" people from mounting various hardlink attacks. – Satō Katsura Jul 4 '16 at 13:13

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.