Linux – Where should I place a downloaded tarball

directory-structurelinuxsoftware installation

I have downloaded the ChromePlus tarball and extracted it to my home directory. The extracted folder contains an executable that I can double-click to launch ChromePlus. So I assume I do not need to any extra things to install it.

I'm new to Linux. Where should I place the ChromePlus directory? It's currently sitting on my home directory, and it does not look neat. After googling, I thought about /bin/, /usr/bin, /usr/lib. Where is the best place?

Best Answer

By convention, /opt is used for manually installed programs with self contained directories.

Programs in self contained directories will not show up in your PATH by default, but generally this is solved by creating symlinks in /usr/local/bin to any binaries under /opt.

As implied above, /usr/local is the other location for manually installed files, but it's generally only used for programs that split their files (/usr/local/bin for executables, /usr/local/lib for libraries, etc.).

Using /opt and /usr/local avoids potential conflicts between manually installed files and files installed by a package management system (yum, apt, etc. generally install files in /usr/bin, /usr/lib, etc.). Historically, conflicts tended to result in files being silently overwritten, causing all sorts of unexpected behaviour. Modern package management systems are better about this, but it's still best not to rely on automated conflict resolution that may or may not always do what you expect.

Related Question