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