Home  >  Article  >  Operation and Maintenance  >  What does the --prefix command mean in Linux?

What does the --prefix command mean in Linux?

藏色散人
藏色散人Original
2019-05-20 18:05:0724131browse

What does the --prefix command mean in Linux?

Concept:

The installation of source code generally consists of 3 steps: configure (configure), compile (make ), installation (make install).

Configure is an executable script that has many options. Use the command ./configure --help in the source code path to be installed to output a detailed list of options. The –prefix option is the path to configure the installation.

Function 1:

If this option is not configured, the executable file will be placed in /usr/local/ by default after installation bin, library files are placed in /usr/local/lib by default, configuration files are placed in /usr/local/etc by default, and other resource files are placed in /usr/local/share, which is quite messy.

If you configure –prefix, such as:

./configure --prefix=/usr/lcoal/test

You can put all resource files in the /user/local/test path without clutter.

Function 2:

When a certain installed software is no longer needed, you only need to simply delete the installation directory to uninstall the software cleanly; To transplant software, you only need to copy the entire directory to another machine (same operating system);

Of course to uninstall the program, you can also use make uninstall once in the original make directory, but only if the make file has been specified uninstall.

The above is the detailed content of What does the --prefix command mean in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn