Linux program installation directory/opt directory and/usr/local directory __linux

Source: Internet
Author: User

When Linux installs the software, I always have the idea that the software is installed in that directory. Because the Linux system differs from the Windows system, instead of creating a folder on that disk, install the program you need to install to the specified directory. The Linux directory is similar to a tree, the topmost is its root directory, each directory has its own different function.

Linux Software Installation directory is also fastidious, the correct choice of installation directory for System management is useful, here to explain the program installation directory/opt directory and the difference between the/usr/local directory. first, opt directory

The/OPT directory is used to install additional packages and is a user-level program directory that can be understood as d:/software. Install to the/OPT directory of the program, all its data, library files and so on are placed under the same directory. Opt has optional meaning, here can be used to place the third party large software (or game), when you do not need, directly rm-rf off. /OPT can also be mounted separately on other disks when there is not enough hard disk capacity.

For example: two,/usr/local directory

/usr: A system-level directory that can be understood as c:/windows/.
/usr/lib: Understood as c:/windows/system32.
/usr/local: User-level program directory, can be understood as C:/progrem files/. Software compiled by the user by default will be installed in this directory.
This is mainly for those software that is installed manually, that is, software that is not installed through the "new stand" or apt-get. It has a similar directory structure as the/usr directory. Let the package Manager manage the/usr directory and place the custom script (scripts) under the/usr/local directory. Third, summary

In fact, the installation software program is not required to complete in the specified directory, installation Java, Tomcat, etc. can also be installed in the OPT directory, but the expansion of the installation program and management, easy to use is the best. The summary opt directory and the usr/local directory are/usr/local under the general directory where you install the software, which is equivalent to the Programefiles directory under Windows. /opt This directory is the installation directory for some large software, or the installation directory of some service programs. Reference Articles

Linux software is installed to/usr,/usr/local/or/opt directory.
The role and content of Linux directories
Detailed description of Linux directories and each directory
Discussion on/usr and/usr/local/opt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.