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

What does the --prefix command mean in Linux?

藏色散人
Release: 2020-09-18 16:02:59
Original
24288 people have browsed it

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template