1

I'm running (k)ubuntu 14.04 and everything I've read tells me to install 3rd party software in opt. everything is working fine but I want to know if I'm going to encounter problems later with add-ons and what not?

  • If you are on a single user system, you can keep it where you wish. On a multiuser system where you want others to use it, it should be owned by root and put in a general location. Personally I use /usr/local but you can use /opt if you wish, personal choice really. – Panther Feb 25 '16 at 00:21
  • You answered my question, but stack exchange is not giving me the option of voting it up, but thank you! –  Feb 25 '16 at 00:38
  • how do I say "answered". –  Feb 25 '16 at 00:52
  • converted my comment into an answer – Panther Feb 25 '16 at 12:24

1 Answers1

1

If you are on a single user system, you can keep it where you wish.

I personally tend to use $HOME/bin for scripts or personal binaries, make the directory if needed.

You then make sure $HOME/bin is on your $PATH by adding the following to ~/.bashrc

if [ -d $HOME/bin ]; then
PATH=$PATH:$HOME/bin

you can add a custom launcher if needed, see How do I add a custom launcher?

On a multiuser system where you want others to use it, it should be owned by root and put in a general location. Personally I use /usr/local but you can use /opt if you wish, personal choice really.

See The Filesystem Hierarchy Standard with the technical difference between the two is discussed here - Use of /opt and /usr/local directories in the context of a PC

From https://wiki.debian.org/FilesystemHierarchyStandard

/opt/ Add-on application software packages Pre-compiled, non ".deb" binary distribution (tar'ed..) goes here. /opt/bin/ : Same as for top-level hierarchy /opt/include/ : Same as for top-level hierarchy /opt/lib/ : Same as for top-level hierarchy /opt/sbin/ : Same as for top-level hierarchy /opt/share/ : Same as for top-level hierarchy

/usr/local/ : Tertiary hierarchy for local data installed by the system administrator /usr/local/bin : locally compiled binaries, local shell script, etc. /usr/local/src : Source code (place where to extract and build non debian'ized stuffs)

For example, some people use /usr/local/src for kernel source from kernel.org. I use $HOME so that I do not need to use root to compile the kernel.

Again on a personal or family computer it makes little difference. If you are taking a RHEL certification test or working on a large corporate system it may.

Panther
  • 102,067