linux program installation directory and opt directory and and usr and local directory

  • 2020-11-26 19:03:58
  • OfStack

When Installing linux, I always have the idea that the software is actually installed in that directory. Because linux system is different from Windows system, it is not necessary to create a folder in that disk and install the programs you need to install into the specified directory. The linux directory is like a tree, with its root directory at the top, and each directory has its own role.

Linux's software installation directory is also exquisite, the correct choice of installation directory is beneficial to system management, here to explain the difference between 1 program installation directory /opt directory and /usr/local directory.

1. opt directory

The /opt directory is used to install additional software packages and is a user-level program directory that can be understood as D:/Software. The program installed in the /opt directory has all its data, library files, and so on placed under the same directory. opt is optional. It can be used to place third party large software (or game). When you don't need it, just drop es21EN-ES22en. You can also mount /opt separately to other disks for use when the disk capacity is insufficient.

Such as:

2. / usr local directory

/usr: System-level directory, which can be interpreted as C:/Windows/.
/usr/lib: Read as C:/Windows/System32.
/usr/local: A user-level program directory that can be interpreted as C:/Progrem Files/. Software compiled by the user will be installed in this directory by default.
Here are mainly those manually installed software, that is, not through the "New Stand" or ES48en-ES49en installed software. It has a similar directory structure to the /usr directory. Let the package manager manage the /usr directory and place the custom script (scripts) under the /usr/local directory.

3. Summary

In fact, the installation of software program does not have to be completed in the specified directory, installation of java, tomcat, etc., can also be installed in the opt directory, but the extensibility and management of the installation program, easy to use is the best. To sum up, opt and usr/local are the directories under /usr/local where you usually install software. This directory is the same as programefiles under windows. opt is either a directory for installing large software or a directory for installing services.

Above is the site to introduce the linux program installation directory /opt directory and /usr/local directory difference, I hope to help you, if you have any questions welcome to give me a message, this site will reply you in time!


Related articles: