Your friend's PC is doing something strange and its not clear from your question what they've done. Your PC is acting normally.

Calling make all Will compile everything, but it doesn't actually make a program called all. It only compiles two programs: hello.exe and add.exe.

So calling ./all should fail because that is asking to run a program called all which doesn't exist.

It's quite possible that your friend has written themselves a program or script called "all". You'll need to ask your friend what that script / program does and how it does it.

Edit

To see what your friend has done open a terminal on your friends pc (like the one in your screen shot) and type the command

ls -lh

This will list all the files in that directory. Look for one named "all". It might look something like this (with the word "all" in green):

-rwxr-----  1 appy appy 67 Oct 23 15:05 all

Assuming that's there you can look at the contents of it by typing

cat ./all

To get yours to work like your friends, create a similar file with the same contents. To make it runnable you may need to change the file permissions:

chmod u+x all
Answer from Philip Couling on Stack Overflow
🌐
Ubuntu Wiki
wiki.ubuntu.com › ubuntu-make
ubuntu-make - Ubuntu Wiki
December 21, 2017 - Ubuntu Make is a command line tool which allows you to download the latest version of popular developer tools on your installation, installing it alongside all of the required dependencies (which will only ask for root access if you don't have all the required dependencies installed already), ...
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › linux make command with examples
Linux make Command with Examples | phoenixNAP KB
December 9, 2025 - The examples in this tutorial explained how to use the make command in Linux to compile files into executables. Next, download the Linux commands cheat sheet to learn other important Linux commands. Was this article helpful? YesNo · Contents · Subscribe to our newsletterSUBSCRIBE · Next you should read · SysAdmin How to Set Environment Variables in Linux · DevOps and Development SysAdmin How to Uninstall or Remove Software Packages From Ubuntu ·
🌐
Ubuntu
manpages.ubuntu.com › manpages › xenial › man1 › make.1.html
Ubuntu Manpage: make - GNU make utility to maintain groups of programs
If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously. -k, --keep-going Continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same. -l [ ... load] Specifies that no new jobs (commands) should be started if there are others jobs running and the load average is at least
Top answer
1 of 2
9

Your friend's PC is doing something strange and its not clear from your question what they've done. Your PC is acting normally.

Calling make all Will compile everything, but it doesn't actually make a program called all. It only compiles two programs: hello.exe and add.exe.

So calling ./all should fail because that is asking to run a program called all which doesn't exist.

It's quite possible that your friend has written themselves a program or script called "all". You'll need to ask your friend what that script / program does and how it does it.

Edit

To see what your friend has done open a terminal on your friends pc (like the one in your screen shot) and type the command

ls -lh

This will list all the files in that directory. Look for one named "all". It might look something like this (with the word "all" in green):

-rwxr-----  1 appy appy 67 Oct 23 15:05 all

Assuming that's there you can look at the contents of it by typing

cat ./all

To get yours to work like your friends, create a similar file with the same contents. To make it runnable you may need to change the file permissions:

chmod u+x all
2 of 2
0

"all" in this case is what is called a "pseudo-target" in make terminology. Since there is no build command under the all: ... line, there is nothing that will actually create a file called all (and in fact, having a file in that directory named all and having a timestamp newer than the .c, .o and .exe files is likely to confuse make). The pseudo-target here is simply a way to say that both the other .exe files must be built for make to consider its job done.

Assuming this is GNU Make, an entry .PHONY: all will tell it that all does not really correspond to a file that should exist.

🌐
TutorialsPoint
tutorialspoint.com › unix_commands › make.htm
make Command in Linux
Make is a command-line utility in Linux that helps developers save time by automating repetitive tasks during the build process. It ensures only the changed parts of a project are recompiled. This practice speeds up the process and reduces errors.
🌐
iO Flood
ioflood.com › blog › install-make-command-linux
Intro to 'make' Linux Command: Installation and Usage
April 26, 2024 - For RPM-based distributions like CentOS, you would run the command sudo yum install make. # For Debian based distributions like Ubuntu sudo apt-get install make # For RPM based distributions like CentOS sudo yum install make # Output: # Reading ...
🌐
Linux Hint
linuxhint.com › install-make-ubuntu
How to install make on Ubuntu – Linux Hint
The make command in Linux is used to compile and manage a collection of applications and files from source code. It allows developers to use the terminal to install and collect a variety of programs. It also manages the compilation process for large projects.
Find elsewhere
🌐
LinuxSimply
linuxsimply.com › home › the “make” command in linux [5 practical examples]
The “make” Command in Linux [5 Practical Examples]
August 31, 2023 - I will compile all files with the make command after updating the text.c file. To achieve so, follow the below procedures. Steps to Follow > ➊ At first, open the Ubuntu Terminal.
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-install-make-on-ubuntu
How to install make on Ubuntu - GeeksforGeeks
January 17, 2025 - The basic objective of the make command is to break down a large program into smaller chunks and determine if it needs to be recompiled. It also has all of the necessary instructions for recompiling them. In this article, we will be installing the make program on the Ubuntu system.
🌐
Computer Hope
computerhope.com › unix › umake.htm
Linux Make Command
June 1, 2025 - The purpose of the make utility is to determine automatically which pieces of a large program need to be re-compiled, and issue the commands necessary to recompile them. This documentation describes the GNU implementation of make, which was written by Richard Stallman and Roland McGrath, and is currently maintained by Paul Smith.
🌐
Linux Hint
linuxhint.com › install-use-make-ubuntu
How to Install and Use Make on Ubuntu 22.04 – Linux Hint
With “sudo apt install make -y”, the make command utility can be installed and used to install different packages using their source code on Ubuntu 22.04.
🌐
GitHub
github.com › ubuntu › ubuntu-make
GitHub - ubuntu/ubuntu-make: Easy setup of common tools for developers on Ubuntu. · GitHub
sudo add-apt-repository ppa:lyzardking/ubuntu-make sudo apt-get update sudo apt-get install ubuntu-make · If you are running deb-get, then you can simply run: ... You can use --help to get more information and change the verbosity of the output with -v, -vv. Note that this project uses python3 and requires at least python 3.3. All commands use the python 3 version.
Starred by 1.2K users
Forked by 202 users
Languages   HTML 59.2% | Python 39.3% | Perl 0.8% | Shell 0.6% | Dockerfile 0.1% | Standard ML 0.0%
🌐
Javatpoint
javatpoint.com › linux-make-command
Linux make command - javatpoint
May 5, 2020 - Linux make command with examples on files, directories, permission, backup, ls, man, pwd, cd, linux, linux introduction, chmod, man, shell, pipes, filters, regex, vi etc.
🌐
Linux Genie
linuxgenie.net › home › how to install and use make on ubuntu 22.04
How to Install and Use make on Ubuntu 22.04 - Linux Genie
February 29, 2024 - To install make on Ubuntu 22.04, use the command “sudo apt install make”. Moreover, you can also install make and other build-essentials using the “sudo apt install build-essential‘.
🌐
MakeUseOf
makeuseof.com › home › linux › how to fix the "make: command not found" error in ubuntu
How to Fix the "make: command not found" Error in Ubuntu
March 31, 2023 - This command builds and compiles programs directly from the source code. As a Linux user, you can use the make command to compile and install utilities from the terminal.
🌐
It's FOSS
itsfoss.com › make-command-not-found-ubuntu
Make Command Not Found? Here's How to Fix it
January 11, 2023 - The other day I was trying to compile a program on a fresh new Ubuntu system and it threw me an error when I tried to use the make command: The program 'make' is currently not installed. You can install it by typing: sudo apt install make One of the
🌐
Dummies
dummies.com › article › technology › computers › operating-systems › linux › linux-how-to-run-make-150284
Linux: How to Run make | dummies
If your makefile happens to have a different name from the default names, you have to use the -f option to specify the makefile. The syntax of the make command with this option is