2

I have a third-party binary-only program that only comes with .sh instalation script (not even a .deb package) I’d like to install on my system. (PyCharm, if this is relevant.)

I think have basically two options, either install it to /opt or ~/PyCharm.

Where should I install it? Are there any relevant pros or cons?

Installing to /opt will require granting sudo to the installation script. And what if the app wants to update itself? Worst case, I’d have to run it with gksudo.

4

For PyCharm in particular, if you're the only user on the system in question I'd just install it in ~/PyCharm. As you point out it will make upgrades easier.

To answer your question more generally, there are indeed pros and cons to consider:

  • installing in /opt with root ownership typically gives access to all users of the system (that's the way most installers work);
  • if your /home is a separate file system, installing in /opt avoids taking up space there;
  • installing in /opt also avoids taking up space in your backups;
  • installing in your home directory means the software is writeable by default (which simplifies upgrades).

Regarding the latter point, if you're the only user on the system, there's nothing stopping you from installing in /opt and chowning the software's installation directory to yourself: that way, you keep it out of /home, and it's still trivially upgradable.

|improve this answer|||||

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.