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
🌐
The Linux Documentation Project
tldp.org › HOWTO › Software-Building-HOWTO-3.html
Building and Installing Software Packages for Linux: Using Make
Invoking make usually involves just typing make. This generally builds all the necessary executable files for the package in question. However, make can also do other tasks, such as installing the files in their proper directories (make install) and removing stale object files (make clean).
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.)

Discussions

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
Why "sudo make install"?
I install to /usr/local so that it’s separate from packages installed by Apt but accessible to all users More on reddit.com
🌐 r/linux
49
33
September 14, 2023
makefile - why "make" before "make install" - Stack Overflow
Not everybody needs make install. For example, if you build some a web app to be deployed on a different server, or if you use a cross-compiler (e.g. you build an Android application on a Linux machine), it makes no sense to run make install. 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
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-make-on-ubuntu
How to install make on Ubuntu - GeeksforGeeks
July 23, 2025 - If the make binary is located at '/usr/bin/make', the installation was successful. The 'make' command is a crucial tool for developers working on Linux, especially for compiling large projects with many files.
🌐
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.
🌐
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 ...
🌐
Thoughtbot
thoughtbot.com › blog › the-magic-behind-configure-make-make-install
The magic behind configure, make, and make install
August 5, 2024 - A guide on how UNIX ./configure && make && make install utility works and where it comes from.
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › linux › install
How to download and install Linux | Microsoft Learn
Download and install Linux in this tutorial that covers how to choose a distribution, how to use the install command with Windows Subsystem for Linux, create a bootable USB for Bare-metal, or set up a Virtual Machine.
🌐
Linux Hint
linuxhint.com › install-make-ubuntu
How to install make on Ubuntu – Linux Hint
It includes executable targets and instructions and is not permitted to generate several makefiles. It’s best if you make a separate directory for it. It maintains track of recently updated files, so only update those that are needed. As a result, this article will show you how to install the make package on Ubuntu.
🌐
Baeldung
baeldung.com › home › installation › changing the install directory with make install
Changing the Install Directory with make install | Baeldung on Linux
March 18, 2024 - Since we’re installing to /usr, we’ll need root privileges. Let’s install it: $ make install $ ls -l /usr/bin/diff -rwxr-xr-x 1 root root 1078184 Jun 6 11:21 diff
🌐
Reddit
reddit.com › r/linux › why "sudo make install"?
r/linux on Reddit: Why "sudo make install"?
September 14, 2023 -

Why do that many projects recommend to push compiled binaries to the filesystem root?

edit Ok. I might have been wrong. My /usr/local ist empty. If stuff only gets installed there, my argument is invalid. I still feel pretty insecure about doing a make install, because it at least could conflict with the system installation.

Thanks for answering. /edit

I have a folder ~/usr where I push all compiled stuff. I then do cmake -DCMAKE_INSTALL_PREFIX=$HOME/usr/ or ./configure --prefix ... and then install that without sudo. Some big projects I compile even have their own prefix.

Sure you have to tell your users to have ~/usr/bin in your PATH. I also added that to my LD_LIBRARY_PATH and PKG_CONFIG_PATH. But IMO that should be a default thing to do for Linux users (who compile stuff).

Polluting your distro installation with random crap is a sure way to get issues later. Its far worse then anything you can do to install Software on Windows.

I mean compiling a bleeding edge kicad, inkscape or jpeg-xl is easy. But will probably trash your system if you already have an older version installed.

(Some projects tell you to build a distro package and sudo install that. Much better, but I still prefer having the binaries in my own prefix. Also a lot got better, since many big projects publish daily snapshots as Appimage or similar.)

edit2 I was of course talking about a single-user system for users who sometimes like to test bleeding edge software. Not Multi-user sytems. Not Grandma, who's not allowed to install stuff. edit

🌐
GitHub
github.com › make-install-linux
make-install-linux · GitHub
make-install-linux has 3 repositories available. Follow their code on GitHub.
🌐
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
Official download location for Make (3.80): ftp://ftp.gnu.org/gnu/make/ For its installation Make depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Sed.
Top answer
1 of 3
21

Avoid making local installs into system directories. The system directories eg /usr, are reserved for the package management system to use. By definition, if you are doing make install that means you are making a local install, and if you need to do sudo make install that means you don't have permission to wherever you are writing.

So, if you are getting permission errors with make install, check and see whether you are trying to install into system directories, and install into /usr/local or similar instead. /usr/local is reserved for local installations. You may need to give yourself permission to write to /usr/local, but this is usually easily done. On Debian this can be done by adding yourself to the staff group. Better still, find or create a binary package, and install that instead. That way you can easily keep track of installed packages and obtain the other benefits of package management.

Note that the package management system conversely does not install into /usr/local, per the FHS. See Section 9.1 of the Debian Policy Manual- File system hierarchy for an overview.

2 of 3
5

As has been answered above, sudo make install lets you install the files in directories which are otherwise read-only to you as a user.

The problem I can foresee is that at a later date you may want to uninstall or upgrade the program. If you still have the source code directory tree then a make uninstall will uninstall the program for you but if, as many other typical users, you had deleted the source code directory tree then you are out of luck. And since you have not installed the program using a package management system, you may also be unable to uninstall the program that way.

The best way to install such programs may be to install them in your home directory. Pass the option --prefix=/home/<user>/<some>/<directory> to ./configure. This will allow you to use make install instead of sudo make install since /home/<user>/<some>/<directory> is writable by you. Also uninstallation is a snap -- rm -rf /home/<user>/<some>/<directory>

🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › beginner questions
Help using configure; make; make install - Linux Mint Forums
August 30, 2014 - cd path_to_the_unzipped_directory ./configure make sudo make install But it will only work when there is a file named "configure" in the extracted folder. ... Searching for "terminal" in Synaptic turns up a bunch of hits. Why compile from source when you can install from Synaptic?