February 27, 2018 admin

Installing Software on Linux from Source Code

install from packages when possible
Sometimes the package manager  may not have the updated version.

In keeping with my previous posts I will use the program htop as an example. This time I will walk you through how to install a program on Linux from Source code.

What is source code?


Download the source code of Htop and compile it on your system.


wget is preinstalled on your Linux machine

Using Source Code

wget http://hisham.hm/htop/releases/2.1.0/htop-2.1.0.tar.gz
tar xzf htop-2.1.0.tar.gz
cd htop-2.1.0
sudo make && sudo make install

Compile htop from the Source on CentOS

Another option is to compile and install htop from the source. This option is useful when you want to install the latest version of htop.


Here is how to download the source and install htop from the source


Download the source files using wget


Wget is a free software package and command line tool used for retrieving files using widely-used Internet protocols like HTTP and FTP.

It is likely preinstalled on your Linux machine but as always we can check with our

which searches your for your not only for the executable but also if it is in the $PATH environment variable.

Is wget installed an in my path?

[code][ec2-user@ip-172-30-1-107 ~]$ which wget

yes it is here!

whereis locates source/binary and manuals sections for specified files.

To find the paths of $PATH environment variable

echo $PATH
[ec2-user@ip-172-30-1-107 ~]$ echo $PATH

This basically mean any executables in any of these path (directories) will excute from the command line regardless of where you are in the file system if you have the right permissions.

Leave a Reply

Your email address will not be published. Required fields are marked *