{"id":1576,"date":"2017-03-21T19:09:30","date_gmt":"2017-03-21T13:39:30","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=1576"},"modified":"2017-03-29T10:15:19","modified_gmt":"2017-03-29T04:45:19","slug":"difference-opt-usrlocal","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/difference-opt-usrlocal\/","title":{"rendered":"UNIX &#8211; What is the difference between \/opt and \/usr\/local"},"content":{"rendered":"<h4 id=\"opt\"><span style=\"color: #000000;\"><strong><span style=\"color: #800000;\">\/opt:<\/span> <\/strong><\/span><\/h4>\n<p>\/opt is for &#8220;the installation of add-on application software packages&#8221;.<\/p>\n<h4 id=\"usr-local\"><span style=\"color: #ff6600;\"><strong>\/usr\/local :<\/strong><\/span><\/h4>\n<p>\/usr\/local is &#8220;for use by the system administrator when installing software locally&#8221;.<\/p>\n[ad type=&#8221;banner&#8221;]\n<h4 id=\"difference-between-opt-and-usr-local\"><span style=\"color: #000000;\"><strong>difference between \/opt and \/usr\/local<\/strong><\/span><\/h4>\n<ul>\n<li>The basic difference is that \/usr\/local is for software not managed by the system packager, but still following the standard unix deployment rules.<\/li>\n<li>That&#8217;s why you have \/usr\/local\/bin, \/usr\/local\/sbin \/usr\/local\/include etc&#8230;<\/li>\n<li>\/opt is for software that doesn&#8217;t follow this and is deployed in a monolithic fashion. This usually includes commercial and\/or cross-platform software that is packaged in the &#8220;Windows&#8221; style.<\/li>\n<li>\/usr\/local\/ usually contains a bin, sbin, lib, and so forth, so works for small scripts, libraries, and the like while \/opt\/ tends to accumulate applications that&#8217;ve grown large enough to accumulate their own directory tree.<\/li>\n<li>\/usr\/local, for self, inhouse, compiled and maintained software. \/opt is for non-self, external, prepackaged binary\/application bundle installation area.<\/li>\n<li>\/opt is for third-party applications that don&#8217;t rely on any dependencies outside the scope of said package. \/usr\/local is for packages installed on this machine outside the scope of the distribution package manager.<\/li>\n<\/ul>\n<h4 id=\"an-example\"><span style=\"color: #000000;\"><strong>An example:<\/strong><\/span><\/h4>\n<ul>\n<li>An open source sip-client supplied as a .deb would install into \/usr. If it was built with the Qt framework, apt would pull it in as a dependency.<\/li>\n<li>The same open source sip-client built from source would reside in \/usr\/local so it would not be messed up by apt if you later installed a .deb package for the same application. You could either build its dependencies from source, or get them from the package manager.<\/li>\n<li>A third-party application in \/opt is supposed to be self-contained. For instance, a proprietary sip-client using Qt would not rely on the version from apt, but would have it bundled or statically linked in.<\/li>\n<\/ul>\n[ad type=&#8221;banner&#8221;]\n","protected":false},"excerpt":{"rendered":"<p>\/opt: \/opt is for &#8220;the installation of add-on application software packages&#8221;. \/usr\/local : \/usr\/local is &#8220;for use by the system administrator when installing software locally&#8221;. [ad type=&#8221;banner&#8221;] difference between \/opt and \/usr\/local The basic difference is that \/usr\/local is for software not managed by the system packager, but still following the standard unix deployment rules. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1331],"tags":[3203,3214,3208,3213,3216,3212,3211,3217,3205,3204,3206,3207,3209,3215,3210],"class_list":["post-1576","post","type-post","status-publish","format-standard","hentry","category-unix","tag-clean-filesystem-hierarchy","tag-root-and-usr","tag-difference-between-optbin-and-optxbin-directories","tag-differences-between-home","tag-directory-structure-why-should-i-move-everything-in-opt","tag-how-to-install-executables","tag-install-self-compiled-software-to-usr-or-usrlocal","tag-linux-usrlocal-or-opt","tag-permissionsownership-of-usrlocalbin","tag-what-is-the-difference-between-tmp-and-vartmp","tag-whats-the-most-appropriate-directory-where-to-place-files-shared-between-users","tag-where-should-generated-scripts-be-placed-in-the-filesystem","tag-where-should-i-install-seafile-server-opt-or-home","tag-where-should-i-put-a-standalone-web-app-which-doesnt-require-an-external-web-server","tag-why-is-bin-a-symbolic-link-to-usrbin"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=1576"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1576\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=1576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=1576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=1576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}