Make is a general purpose workflow program, usually used for compilation. But it can be used for anything.

When you do something like "make all", the make program executes a rule named "all" from a file in current directory named "Makefile". This rule usually calls the compiler to compile some source code into binaries.

When you do "make install", the make program takes the binaries from the previous step and copies them into some appropriate locations so that they can be accessed. Unlike on Windows, installation just requires copying some libraries and executables and there is no registry requirement as such. In short, "make install" just copies compiled files into appropriate locations.

Answer from sharjeel on Stack Exchange
Top answer
1 of 5
78

Make is a general purpose workflow program, usually used for compilation. But it can be used for anything.

When you do something like "make all", the make program executes a rule named "all" from a file in current directory named "Makefile". This rule usually calls the compiler to compile some source code into binaries.

When you do "make install", the make program takes the binaries from the previous step and copies them into some appropriate locations so that they can be accessed. Unlike on Windows, installation just requires copying some libraries and executables and there is no registry requirement as such. In short, "make install" just copies compiled files into appropriate locations.

2 of 5
54

make install does whatever the Makefile author wants it to do. Typically, by this point, it is too late to change the install directory, as it is often known earlier, during the build, so help files and configuration files can be referenced with the correct pathnames.

Many projects use the GNU Autotools to try to improve their portability among hardware and operating system differences. (Different Unix variants use slightly different headers for declarations of functions that are slightly off the usual path -- except most programs need one or another of the ones declared in different locations.)

When a project does use the Autotools, the normal mantra to install it is:

./configure
make
make install

The ./configure typically allows you to use a command line option like --prefix /opt/apache or something similar to specify a different pathname. /usr/local/ is a common default prefix. It is far easier for locally built software to live in one place and distribution-provided software to live in the "main directories": /usr/ /bin/, and so on. (Packagers are very careful to never touch files in /usr/local/ -- they know it is exclusively for system administrators.)

Anyway, the ./configure --prefix /path/to/new/prefix will set a variable in the Makefile that is available when compiling the program, modifying the manual pages so they point to the correct locations for files, modifying configuration files, etc. So make will build the software specifically for the install location you want and make install will install it into that location.

Most programs can run even without the final make install step -- just ./program_name will often start them up. This is definitely a per-project thing -- some, like postfix, qmail, etc., are made up of many different moving pieces and rely on them all working together. Others, like ls or su might be self-contained enough to execute fine from the directory they were built in. (This is not often useful -- but sometimes very useful.)

However, not all projects use the Autotools -- they are huge, complicated, and miserable to maintain. Hand-written Makefiles are much simpler to write, and I personally think just distributing a simple Makefile with configuration variables available is a lot easier on developers and users both. (Though the ./configure ; make ; make install mantra is really easy on users when it works.)

🌐
DEV Community
dev.to › skypy › linux-make-install-command-2dd6
Linux make install command - DEV Community
September 1, 2021 - $ sudo make install ./installer.sh /opt/testapp kiwi kiwi 'testapp' -> '/opt/testapp/bin/testapp' (backup: '/opt/testapp/bin/testapp~') 'testapp.conf' -> '/opt/testapp/etc/testapp.conf' (backup: '/opt/testapp/etc/testapp.conf~') installation ...
Discussions

makefile - How can I install and use "make" in Windows? - Stack Overflow
I want to use the make command as part of setting up the code environment, but I'm using Windows. I searched online, but I could only find a make.exe file, a make-4.1.tar.gz file (I don't know what to do with it next) and instructions for how to download MinGW (for GNU; but after installing it, ... More on stackoverflow.com
🌐 stackoverflow.com
[Noob Question] What does make install really do.
That’s 95% correct. As well as moving the files to right places, make install will often setup the PATH correctly, setup config files, set file permissions, add system users. More on reddit.com
🌐 r/linuxquestions
2
1
July 25, 2020
command line - sudo make install - what is being installed? - Unix & Linux Stack Exchange
The commands that are executed by make install (or any invocation of make) are defined in the Makefile (and files included by the Makefile). For simple programs, you can just look for a line install: and see the commands in the lines below. But makefiles can also be quite complicated and scattered ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
November 20, 2018
makefile - why "make" before "make install" - Stack Overflow
This is a "Good Thing™", because ... for the install step. ... Sign up to request clarification or add additional context in comments. ... Just a side note: "make" without any comments will skip any wildcard targets. '%' is equivalent to a regex '+' for target names. Ex. if you have 3 targets: 1) "%_targetsuffix:" 2) "wildTarget:" 3) "defaultTarget:" in this order going top to bottom. The "make" command will skip ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Thoughtbot
thoughtbot.com › blog › the-magic-behind-configure-make-make-install
The magic behind configure, make, and make install
August 5, 2024 - Now that the software is built and ready to run, the files can be copied to their final destinations. The make install command will copy the built program, and its libraries and documentation, to the correct locations.
🌐
GNU
gnu.org › software › make › manual › html_node › Install-Command-Categories.html
Install Command Categories (GNU make)
Category lines are no-ops in ordinary execution because these three Make variables are normally undefined (and you should not define them in the makefile). Here are the three possible category lines, each with a comment that explains what it means: $(PRE_INSTALL) # Pre-install commands follow.
Find elsewhere
🌐
Bifrost
docs.getbifrost.ai › deployment-guides › how-to › install-make
Install make command - Bifrost
# Run in an elevated PowerShell (Run as Administrator) choco install make # verify make --version
🌐
Reddit
reddit.com › r/linuxquestions › [noob question] what does make install really do.
r/linuxquestions on Reddit: [Noob Question] What does make install really do.
July 25, 2020 -

Hi !

I'm sorry for the noob question but I don't manage to find a proper makefile to understand what the install target does by myself.

But apparently, what I understood is that make builds the program executable and make install just moves the executable to the right location, right ?

So that means a software installation is basically just moving an executable to the right location in a computer ? 🤔

🌐
Linux From Scratch
linuxfromscratch.org › museum › lfs-museum › 5.1-pre1 › LFS-BOOK-5.1-PRE1-HTML › chapter05 › make.html
Installing Make-3.80
For its installation Make depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Sed. ... As discussed earlier, we don't recommend running the test suites for the temporary tools here in this chapter. If you still want to run the Make test suite anyway, the following command ...
🌐
TutorialsPoint
tutorialspoint.com › change-the-install-directory-with-make-install
Change the Install directory with make install
January 3, 2023 - To install a package to /usr with libraries in /usr/lib64 · $ ./configure --prefix=/usr --libdir=/usr/lib64 $ make $ sudo make install
🌐
iO Flood
ioflood.com › blog › install-make-command-linux
Intro to 'make' Linux Command: Installation and Usage
April 26, 2024 - In this guide, we will walk you through the process of installing and using the ‘make’ command in Linux. We will cover methods for APT-based distributions like Debian and Ubuntu, as well as YUM-based distributions like CentOS and AlmaLinux.
🌐
Duckware
duckware.com › makeinstall
MakeInstall -- Make Installation Kit
MakeInstall -- Create a Win32 installation kit EXE for a Java program
🌐
Zain's
zainmuiz.hashnode.dev › how-to-install-make-on-windows-machine
How to install 'make' on Windows Machine
September 18, 2021 - For instance, On executing the 'make start' command, make will go through your Makefile and search for a script with name 'start', and execute the commands corresponding to it. Now that we know what 'make' and Makefiles are, Lets see how we install it correctly on Windows.
🌐
Robert Elder
blog.robertelder.org › intro-to-install-command
Intro To 'install' Command In Linux
May 30, 2023 - I use the 'install' command to copy and install files exactly how I want: · The simplest use of the 'install' command works just like the 'cp' command, and all it does is make a copy of a file. If I start out with the file 'notes.txt':
🌐
Hackers Arise
hackers-arise.com › linux-basics-for-hackers-the-make-command-compiling-and-installing-software-from-source-in-linux
Linux Basics for Hackers, the Make Command: Compiling and Installing Software from Source in Linux – Hackers Arise
April 24, 2025 - This command copies the compiled binaries, libraries, and documentation to their appropriate locations on your system, as specified in the Makefile. The installation locations are typically determined during the configure step.
🌐
GNU
gnu.org › software › make › manual › make.html
GNU make
16.2 Utilities in Makefiles · 16.3 Variables for Specifying Commands · 16.4 DESTDIR: Support for Staged Installs · 16.5 Variables for Installation Directories · 16.6 Standard Targets for Users · 16.7 Install Command Categories · Appendix A Quick Reference ·