• About Us
  • Announce
  • Privacy Policy
  • Contact us
MasterTrend News
  • HOME
    • BLOG
    • STORE
  • Tutorials
  • Hardware
  • Gaming
  • Mobiles
  • Security
  • Windows
  • AI
  • Software
  • Networks
  • News
  • English English
    • Spanish Spanish
    • Portuguese Portuguese
    • French French
    • Italian Italian
    • German German
    • Korean Korean
    • Japanese Japanese
    • Chinese Chinese
    • Russian Russian
    • Thai Thai
    • Polish Polish
    • Turkish Turkish
    • Indonesian Indonesian
    • Hindi Hindi
    • Arabic Arabic
    • Swedish Swedish
    • Dutch Dutch
No result
See all results
  • HOME
    • BLOG
    • STORE
  • Tutorials
  • Hardware
  • Gaming
  • Mobiles
  • Security
  • Windows
  • AI
  • Software
  • Networks
  • News
  • English English
    • Spanish Spanish
    • Portuguese Portuguese
    • French French
    • Italian Italian
    • German German
    • Korean Korean
    • Japanese Japanese
    • Chinese Chinese
    • Russian Russian
    • Thai Thai
    • Polish Polish
    • Turkish Turkish
    • Indonesian Indonesian
    • Hindi Hindi
    • Arabic Arabic
    • Swedish Swedish
    • Dutch Dutch
No result
See all results
MasterTrend News
No result
See all results
Start Tutorials

Compile on Linux: Run in minutes with 3 commands ⚡

MasterTrend Insights by MasterTrend Insights
September 20, 2025
in Tutorials
Reading time:Lectura de 6 minutos
TO TO
0
Compiling on Linux - Person programming on a Linux laptop, running commands in the terminal to compile code with gcc and make; guide to compiling on Linux.

Compiling on Linux: Developer using the terminal to compile source code with gcc and make on GNU/Linux, perfect for programming tutorials, DevOps, and learning the command line.

1
SHARED
4
Views
Share on FacebookShare on Twitter

Contents

  1. Compiling on Linux: 3 Steps to Creating Binaries 🔥
    1. Key Summary
  2. What is Compiling from Source Code?
  3. 3-Step Build Process: Configure, Make, Install
  4. How ./configure Starts the Process
  5. make does most of the work
  6. Finishing with make install
    1. Related Posts

Compiling on Linux: 3 Steps to Creating Binaries 🔥

Key Summary

  • Most software follows a 3-step process to compile from source code: ./configure && make && make install.
  • The script configure checks the dependencies, make generates the executable, and tools such as autoconf/automake automate this process.
  • Installation is usually optional, making it easier to run commands copied into directories in the PATH of system.

Compiling from source code can seem intimidating compared to using package managers, but with three basic commands, the process is simple and straightforward. 🚀

What is Compiling from Source Code?

The programs you use can be interpreted or compiled. Interpreted programs are text files containing code that another program (the interpreter) executes in real time. Compiled programs, on the other hand, are binary files containing machine code ready to be executed.

Compiled executables are very common, especially in large programs. When you compile from source code, yousas a compiler like gcc to convert the code into an executable program, often distributed across multiple files.

Linux terminal showing Steam installation with commands.

The compilation process can be extensive and complex, which is why it is usually automated with programs such as make. The files makefiles control how the final executable is built.

In large projects, these makefiles They can be so complex that they are automatically generated with tools such as autoconf and automake to ensure compatibility across different architectures. 🛠️

3-Step Build Process: Configure, Make, Install

Most software uses this basic pattern to compile from source code:

./configure && make && make install

Popular programs like Apache use this sequence (or some variant), such as explains his file INSTALL:

Apache INSTALL file fragment showing ./configure, make, and make install steps.

Node.js also follows this structure, as indicated in its BUILDING.md file:

Snippet from the Node.js BUILDING.md file showing ./configure, make, and make install.

Each project may have slight variations from this command string. Use the logical AND operator (&&) stops the process if any step fails:

./configure && make && make install

Or you can run each command separately on a single line with a semicolon, although this will run all commands without stopping if any fail:

./configure; make; make install

You can also do the three lines separately:

./configure make make install

If you just want to try the program without installing it, you can skip make install and run it from its folder.

Some repositories have the script configure Ready, while others (like grep) require running another script first to generate it. Always refer to the INSTALL, BUILD, or README file to follow the project's recommendations. 📋

How ./configure Starts the Process

The script configure It is the starting point of the compilation process, adapting the project to your environment.

This script checks the dependencies required for the project, checking versions and availability. Upon completion, it generates a file named Makefile for the next phase.

The script configure offers many configurable options with ./configure --help, allowing you to customize build details.

So much configure as make generate a lot of output on the screen. Use the option --quiet if you want to run these commands without showing so much detail. 🤫

If the script is missing configure, some projects include a script like autogen.sh to generate it. For example, htop uses it:

Output of autogen.sh script in htop source code generating configure.

Very simple projects or projects written in other languages may not have configure. There the process is in two steps: make && make install.

The script configure It also controls installation details, such as the parameter --prefix, which sets the installation root directory. By default it is /usr/local, but you can change it to better organize your files.

make does most of the work

After configure generates a Makefile, the actual compilation of the software begins with make.

This program reads the Makefile and follows rules to decide which files to create or update. The Makefiles handwritten are easy to understand for those who know the syntax.

For example, this one Makefile simple compiles a program that depends on the file program.c:

program: program.c gcc -o program program.c

make check if program.c changed since the last compilation. If it didn't change, do nothing; if it did, compile with gcc.

Close-up of illuminated keys of Das Keyboard 6 Professional.

The makefiles automatically generated are usually much more complex. For example, the makefile htop has 2,440 lines:

Fragment of the auto-generated Makefile for the htop project.

But you don't need to understand every detail. Unless you modify the source code, just run it. make and let the system take care of it.

The step make It may take minutes or longer for large projects. If it fails, it's usually due to missing dependencies. The advantage is that make saves progress and resumes where it left off when you run again.

Finishing with make install

After compiling, the created executable is usually located in the root of the project or in a subdirectory called bin. You can run it using the full path:

Running make in cli directory creates bin subdirectory with the final executable.

This is useful for testing, but in the long run you'll want to install it in an accessible location.

The objective install that defines the makefile Copy the necessary files and set permissions. The default location is /usr/local/bin, although you can change it with --prefix.

If you don't have permissions for that folder, run sudo make install and provides the administrator password.

The installation directory must be included in your variable PATH to be able to run the program with just its name, without specifying the full path.

Share this:
FacebookLinkedInPinterestXRedditTumblrBlueskyThreadsShare

Related Articles:

  • How to Install Linux in 3 Easy Steps (Without Erasing Windows)
    The Linux Directory Structure, Explained
    The Linux directory structure is fundamental to understanding how this powerful operating system works.
  • Password managers
    Password Managers 🚀: The Key to Avoiding…
    Password managers 🔑 are the solution for creating and saving secure passwords effortlessly. Prevent theft with these apps!…
  • How to Install Software on Ubuntu: A Beginner's Guide to Snap and APT
    How to install software on Ubuntu: Discover 5 tricks…
    How to install software on Ubuntu is easier than you think. Learn in less than 10 minutes! ⏰
  • How to open CMD as administrator in Windows 11 (10 methods)
    How to open CMD as administrator in Windows 11
    How to open Command Prompt (CMD) as Administrator in Windows 11
  • Wine vs. Virtual Machines: Which is the Best?
    Wine vs. Virtual Machines: Find Out Who Wins! 🏆💻
    Wine vs. Virtual Machines: Learn which offers better performance and compatibility for your Windows apps today! 🚀✨
  • How to Setup a Local Linux Web Server on Windows 11
    How to Setup a Local Linux Web Server on Windows 11
    How to run a local Linux web server on a Windows 11 window

Related Posts

  • Best dating apps 🚀: Find out where to find a long-term partner now.
  • Portable Monitors 2025: Discover the Best and Cheapest 🔥🎯
  • 🌟 Microsoft Surface Updates: Reasons not to miss this new version.
  • South of Midnight: A Gothic Adventure in 60fps – Discover it NOW! ⚡️
  • Hidden Costs of Owning a Chromebook: Don't Buy Before You Read This! ⚠️
  • Snapchat Crashes On Its Own: 10 Quick And Effective Solutions
  • Google Chrome on Android and Security: 3 Settings That Save Your Data 🔒🚀
  • How to Disable Command Prompt in Windows 11 ⚡ Quick and Safe Methods
Tags: Evergreen ContentLinuxTechTips
Previous Post

Clean up WinSxS in Windows 11 now: free up GB without deleting ⚡

Next publication

Tempest Rising Review: Classic RTS Revives with 22 Missions! 🔥

MasterTrend Insights

MasterTrend Insights

Our editorial team shares in-depth reviews, tutorials, and recommendations to help you get the most out of your digital devices and tools.

Next publication
Tempest Rising Review: RTS cover featuring a cybernetic commander and a futuristic blue/red battleground, featuring tanks, soldiers, drones, and aircraft in combat.

Tempest Rising Review: Classic RTS Revives with 22 Missions! 🔥

5 1 vote
Article Rating
Subscribe
Access
Notify of
guest
guest
0 Comments
Oldest
Newest Most voted
Online Comments
See all comments

Stay Connected

  • 976 Fans
  • 118 Followers
  • 1.4k Followers
  • 1.8k Subscribers

Don't miss the latest in technology and gaming.
Exclusive tips, how-to guides, and analysis every day.

Subscription Form
  • Tendencies
  • Comments
  • Last
How to add a clock to the Windows 11 desktop: 3 surefire tricks!

How to add a clock to your Windows 11 desktop: Get more done in minutes! ⏱️

May 1, 2025
How to save game in REPO

How to save your game in REPO 🔥 Discover the secret to not losing progress

July 7, 2025
12 Best Alternatives to Lucky Patcher for Android

Lucky Patcher Alternatives: 12 Better and Easy Apps! 🎮⚡

May 12, 2025
How to use AdGuard DNS on Android in 2024

How to use AdGuard DNS on Android in 2025

February 11, 2025
Gmail Features on Android: Save Time with 5 Tips

Gmail Features on Android: 5 Tricks You Didn't Know About! 📱✨

12
Motherboard repair - Repair Motherboards

Notebook Motherboard Repair

10
Install Windows 11 Home without Internet

Install Windows 11 Home without Internet

10
How to Back Up Drivers in Windows 11/10 in 4 Steps!

How to Back Up Drivers in Windows 11/10: Avoid Errors! 🚨💾

10
Tempest Rising Review: RTS cover featuring a cybernetic commander and a futuristic blue/red battleground, featuring tanks, soldiers, drones, and aircraft in combat.

Tempest Rising Review: Classic RTS Revives with 22 Missions! 🔥

September 20, 2025
Compiling on Linux - Person programming on a Linux laptop, running commands in the terminal to compile code with gcc and make; guide to compiling on Linux.

Compile on Linux: Run in minutes with 3 commands ⚡

September 20, 2025
Clean up WinSxS in Windows 11 now - Hard drive with "Free Up Storage Space" message; how to clean up the WinSxS folder in Windows 11 to free up storage space.

Clean up WinSxS in Windows 11 now: free up GB without deleting ⚡

September 20, 2025
Windows Recall - Windows 11 laptop showing a crossed-out Windows Recall icon, symbolizing how to disable Windows Recall for privacy and security concerns.

Windows Recall: 3 Steps to Protect Your Privacy ⚠️

September 20, 2025

Recent News

Tempest Rising Review: RTS cover featuring a cybernetic commander and a futuristic blue/red battleground, featuring tanks, soldiers, drones, and aircraft in combat.

Tempest Rising Review: Classic RTS Revives with 22 Missions! 🔥

September 20, 2025
5
Compiling on Linux - Person programming on a Linux laptop, running commands in the terminal to compile code with gcc and make; guide to compiling on Linux.

Compile on Linux: Run in minutes with 3 commands ⚡

September 20, 2025
4
Clean up WinSxS in Windows 11 now - Hard drive with "Free Up Storage Space" message; how to clean up the WinSxS folder in Windows 11 to free up storage space.

Clean up WinSxS in Windows 11 now: free up GB without deleting ⚡

September 20, 2025
4
Windows Recall - Windows 11 laptop showing a crossed-out Windows Recall icon, symbolizing how to disable Windows Recall for privacy and security concerns.

Windows Recall: 3 Steps to Protect Your Privacy ⚠️

September 20, 2025
4
MasterTrend News logo

MasterTrend Info is your go-to source for technology: discover news, tutorials, and analysis on hardware, software, gaming, mobile devices, and artificial intelligence. Subscribe to our newsletter and don't miss any trends.

Follow us

Browse by Category

  • Gaming
  • Hardware
  • AI
  • Mobiles
  • News
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

Recent News

Tempest Rising Review: RTS cover featuring a cybernetic commander and a futuristic blue/red battleground, featuring tanks, soldiers, drones, and aircraft in combat.

Tempest Rising Review: Classic RTS Revives with 22 Missions! 🔥

September 20, 2025
Compiling on Linux - Person programming on a Linux laptop, running commands in the terminal to compile code with gcc and make; guide to compiling on Linux.

Compile on Linux: Run in minutes with 3 commands ⚡

September 20, 2025
  • About Us
  • Announce
  • Privacy Policy
  • Contact us

Copyright © 2025 https://mastertrend.info/ - All rights reserved. All trademarks are property of their respective owners.

Spanish Spanish
Spanish Spanish
English English
Portuguese Portuguese
French French
Italian Italian
Russian Russian
German German
Chinese Chinese
Korean Korean
Japanese Japanese
Thai Thai
Hindi Hindi
Arabic Arabic
Turkish Turkish
Polish Polish
Indonesian Indonesian
Dutch Dutch
Swedish Swedish
No result
See all results
  • English English
    • Spanish Spanish
    • Portuguese Portuguese
    • French French
    • Italian Italian
    • German German
    • Korean Korean
    • Japanese Japanese
    • Chinese Chinese
    • Russian Russian
    • Polish Polish
    • Indonesian Indonesian
    • Turkish Turkish
    • Hindi Hindi
    • Thai Thai
    • Arabic Arabic
    • Swedish Swedish
    • Dutch Dutch
  • Gaming
  • Hardware
  • AI
  • Mobiles
  • News
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

Copyright © 2025 https://mastertrend.info/ - All rights reserved. All trademarks are property of their respective owners.

Comment Author Info
:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz
RedditBlueskyXMastodonHacker News
Share this:
MastodonVKWhatsAppTelegramSMSHacker NewsLineMessenger
Your Mastodon Instance