How to install a software package from source file in Linux


A source file is a file that is written in the C programming language. In this post, I will be pointing you to the step to take to be able to use software downloaded from a source file. Although we might not run into situations where we work with source files. But just in case you have to, with this post you should know what to do. Learn how to install a software package from a source file in Linux.

Kindly refer to some of my previous guides are available in the links Practical-use-of-SELinux-in-production-how-to-locate-directory-file-context-and-restore-it-with-SELinux/, how to create a-static-pod-in-Kubernetes-with-demos-that-can-help-you-become-a-better-Kubernetes-administrator, how to create-and-deliver-a-report-on-system-utilization-on-a-Linux-based-os, and how to use-container-insights-to-get-the-full-benefits-of-azure-monitor-for-azure-Kubernetes-workload/.

The data that is taken from the source system before it is translated to the Common Data Format is stored in source files. The data in source files is usually in its raw form. The data can be separated into any number and kind of files, based on how it is stored in the source system. Source files, for example, might be structured in a star schema, with some files carrying business facts and others containing business dimensions

Steps to Installing Software Package From Source File

Typically users of open-source software would download from a place like So after downloading the file, what next? How do you make sense of it or how does it sitting in your download folder become of any value.

Obtain the Source File

The first thing to do would be to extract the file. for the purpose of demonstration. I have downloaded nmapsi so, you can also download and follow along. We will use the command shown below to extract it. Before extracting make sure you are in the directory where the downloaded software is located. So the next thing to do is a cd into the download directory, then after that, we extract.

tar xvf < name >
How to install a software package from a source file in Linux-extract
decompressed file nmap

Extract Code for Source File

The next thing to do would be to look into the folder and check for the README.txt for any instructions on what to do and also the Make file. In our case, it’s a

How to install a software package from a source file in Linux-cmake
contents of decompressed file

checking the file

How to install a software package from a source file in Linux-README.md_

The file is showing instructions for what needs to be done for the creating of the binary. Typically we are been shown the dependencies that the file needs for us to run before we can use the source file

So let's download another program called Pascal and see what's inside.

If we cd into the downloads directory, we will see that there is a file called pc-3.2.0-x86_64-linux.tar that we just downloaded. Now, we are to decompress the file to see what’s inside it with the format as shown below.

#tar xvf <name of file 

X is for extract, V for verbose, and File is file. Since we downloaded pc-3.2.0-x86_64-linux.tar, the format will be as shown below

#tar xvf pc-3.2.0-x86_64-linux.tar.

We can choose to decompress the file elsewhere by adding the -C option and the place you want to place the decompressed materials

#tar xvf pc-3.2.0-x86_64-linux -C /temp

tar xvf pc-3.2.0-x86_64-linux -C /temp. The decompressed materials will be sent to the temp directory

Check below for the decompressed file. If we cd into the decompressed tar xvf pc-3.2.0-x86_64-linux file as shown below, we will see that there are a number of files including a script, so we need to run the script.

contents of the decompressed file

So the first thing to do is to view any accompanying document, so we need to uncompress doc-pdf.tar.gz

documents in decompressed file

Install the Software Package From the Source File

We then need to view them to see if we need any information to help us run the program. Other than this, the only thing we need to do again is to run any other program in the decompressed file.

doc in compressed file

Content of the script in the download folder

script installation instruction in the command ” less”


Congratulations! You’ve successfully installed a software package from a source file in Linux. In summary, we might not be able to directly run a source linux package directly out of the box the same way we would with exe files. So we will do is to decompress the file. Check the file and its content for any further instructions; most of the time, we will have to deal with dependencies before we will finally be able to run the program.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x