How to List Files Installed From a RPM or DEB Package in Linux

Have you ever wondered where the various files contained inside a package are installed (located) in the Linux file system? In this article, we’ll show how to list all files installed from or present in a certain package or group of packages in Linux.

This can help you to easily locate important package files like configurations files, documentation and more. Let’s look at the different methods of listing files in or installed from a package:

How to List All Files of Installed Package in Linux

You can use the repoquery command which is part of the yum-utils to list files installed on a CentOS/RHEL system from a given package.

To install and use yum-utils, run the commands below:

# yum update 
# yum install yum-utils

Now you can list files of an installed RPM package, for example httpd web server (note that the package name is case-sensitive). The --installed flag means installed packages and -l flags enables listing of files:

# repoquery --installed -l httpd
# dnf repoquery --installed -l httpd  [On Fedora 22+ versions]

Repoquery List Installed Files of Httpd

Important: In Fedora 22+ version, the repoquery command is integrated with dnf package manager for RPM based distribution to list files installed from a package as shown above.

Alternatively, you can as well use the rpm command below to list the files inside or installed on the system from a .rpm package as follows, where the -g and -l means to list files in package receptively:

# rpm -ql httpd

RPM Query Package for Installed Files

Another useful option is used to use -p to list .rpm package files before installing it.

# rpm -qlp telnet-server-1.2-137.1.i586.rpm

On Debian/Ubuntu distributions, you can use the dpkg command with the -L flag to list files installed to your Debian system or its derivatives, from a given .deb package.

In this example, we will list files installed from apache2 web server:

$ dpkg -L apache2

dpkg List Installed Packages


All You Need To Know About Processes in Linux

In this article, we will walk through a basic understanding of processes and briefly look at how to manage processes in Linux using certain commands.

A process refers to a program in execution; it’s a running instance of a program. It is made up of the program instruction, data read from files, other programs or input from a system user.

Types of Processes

There are fundamentally two types of processes in Linux:

  • Foreground processes (also referred to as interactive processes) – these are initialized and controlled through a terminal session. In other words, there has to be a user connected to the system to start such processes; they haven’t started automatically as part of the system functions/services.
  • Background processes (also referred to as non-interactive/automatic processes) – are processes not connected to a terminal; they don’t expect any user input.

What is Daemons

These are special types of background processes that start at system startup and keep running forever as a service; they don’t die. They are started as system tasks (run as services), spontaneously. However, they can be controlled by a user via the init process.

Linux Process State

Creation of a Processes in Linux

A new process is normally created when an existing process makes an exact copy of itself in memory. The child process will have the same environment as its parent, but only the process ID number is different.

There are two conventional ways used for creating a new process in Linux:

  • Using The System() Function – this method is relatively simple, however, it’s inefficient and has significantly certain security risks.
  • Using fork() and exec() Function – this technique is a little advanced but offers greater flexibility, speed, together with security.

How Does Linux Identify Processes?

Because Linux is a multi-user system, meaning different users can be running various programs on the system, each running instance of a program must be identified uniquely by the kernel.

And a program is identified by its process ID (PID) as well as it’s parent processes ID (PPID), therefore processes can further be categorized into:

  • Parent processes – these are processes that create other processes during run-time.
  • Child processes – these processes are created by other processes during run-time.

The Init Process

Init process is the mother (parent) of all processes on the system, it’s the first program that is executed when the Linux system boots up; it manages all other processes on the system. It is started by the kernel itself, so in principle it does not have a parent process.

The init process always has process ID of 1. It functions as an adoptive parent for all orphaned processes.

You can use the pidof command to find the ID of a process:

# pidof systemd
# pidof top
# pidof httpd

Find Linux Process ID

To find the process ID and parent process ID of the current shell, run:

$ echo $$
$ echo $PPID

Find Linux Parent Process ID

Starting a Process in Linux

Once you run a command or program (for example cloudcmd – CloudCommander), it will start a process in the system. You can start a foreground (interactive) process as follows, it will be connected to the terminal and a user can send input it:

# cloudcmd

Start Linux Interactive Process

Linux Background Jobs

To start a process in the background (non-interactive), use the & symbol, here, the process doesn’t read input from a user until it’s moved to the foreground.

# cloudcmd &
# jobs

Start Linux Process in Background

You can also send a process to the background by suspending it using [Ctrl + Z], this will send the SIGSTOP signal to the process, thus stopping its operations; it becomes idle:

# tar -cf backup.tar /backups/*  #press Ctrl+Z
# jobs

To continue running the above-suspended command in the background, use the bg command:

# bg

To send a background process to the foreground, use the fg command together with the job ID like so:

# jobs
# fg %1

Linux Background Process Jobs

You may also like: How to Start Linux Command in Background and Detach Process in Terminal

States of a Process in Linux

During execution, a process changes from one state to another depending on its environment/circumstances. In Linux, a process has the following possible states:

  • Running – here it’s either running (it is the current process in the system) or it’s ready to run (it’s waiting to be assigned to one of the CPUs).
  • Waiting – in this state, a process is waiting for an event to occur or for a system resource. Additionally, the kernel also differentiates between two types of waiting processes; interruptible waiting processes – can be interrupted by signals and uninterruptible waiting processes – are waiting directly on hardware conditions and cannot be interrupted by any event/signal.
  • Stopped – in this state, a process has been stopped, usually by receiving a signal. For instance, a process that is being debugged.
  • Zombie – here, a process is dead, it has been halted but it’s still has a task to perform on the system.

How to View Active Processes in Linux

There are several Linux tools for viewing/listing running processes on the system, the two traditional and well known are ps and top commands:

1. ps Command

It displays information about a selection of the active processes on the system as shown below:

# ps 
# ps -e | head 

List Linux Active Processes

2. top – System Monitoring Tool

top is a powerful tool that offers you a dynamic real-time view of a running system as shown in the screenshot below:

# top 

Read this for more top usage examples: 12 TOP Command Examples in Linux

3. glances – System Monitoring Tool

glances is a relatively new system monitoring tool with advanced features:

# glances

For a comprehensive usage guide, read through: Glances – An Advanced Real Time System Monitoring Tool for Linux

There are several other useful Linux system monitoring tools you can use to list active processes, open the link below to read more about them:

  1. 20 Command Line Tools to Monitor Linux Performance
  2. 13 More Useful Linux Monitoring Tools

How to Control Processes in Linux

Linux also has some commands for controlling processes such as kill, pkill, pgrep and killall, below are a few basic examples of how to use them:

$ pgrep -u tecmint top
$ kill 2308
$ pgrep -u tecmint top
$ pgrep -u tecmint glances
$ pkill glances
$ pgrep -u tecmint glances

Control Linux Processes

To learn how to use these commands in-depth, to kill/terminate active processes in Linux, open the links below:

  1. A Guide to Kill, Pkill and Killall Commands to Terminate Linux Processess
  2. How to Find and Kill Running Processes in Linux

Note that you can use them to kill unresponsive applications in Linux when your system freezes.

Sending Signals To Processes

The fundamental way of controlling processes in Linux is by sending signals to them. There are multiple signals that you can send to a process, to view all the signals run:

$ kill -l

List All Linux Signals

To send a signal to a process, use the kill, pkill or pgrep commands we mentioned earlier on. But programs can only respond to signals if they are programmed to recognize those signals.

And most signals are for internal use by the system, or for programmers when they write code. The following are signals which are useful to a system user:

  • SIGHUP 1 – sent to a process when its controlling terminal is closed.
  • SIGINT 2 – sent to a process by its controlling terminal when a user interrupts the process by pressing [Ctrl+C].
  • SIGQUIT 3 – sent to a process if the user sends a quit signal [Ctrl+D].
  • SIGKILL 9 – this signal immediately terminates (kills) a process and the process will not perform any clean-up operations.
  • SIGTERM 15 – this a program termination signal (kill will send this by default).
  • SIGTSTP 20 – sent to a process by its controlling terminal to request it to stop (terminal stop); initiated by the user pressing [Ctrl+Z].

The following are kill commands examples to kill the Firefox application using its PID once it freezes:

$ pidof firefox
$ kill 9 2687
$ kill -KILL 2687
$ kill -SIGKILL 2687  

To kill an application using its name, use pkill or killall like so:

$ pkill firefox
$ killall firefox 

Changing Linux Process Priority

On the Linux system, all active processes have a priority and certain nice value. Processes with higher priority will normally get more CPU time than lower priority processes.

However, a system user with root privileges can influence this with the nice and renice commands.

From the output of the top command, the NI shows the process nice value:

$ top  

List Linux Running Processes

Use the nice command to set a nice value for a process. Keep in mind that normal users can attribute a nice value from zero to 20 to processes they own.
Only the root user can use negative nice values.

To renice the priority of a process, use the renice command as follows:

$ renice +8  2687
$ renice +8  2103




Checksum is like a digital fingerprint of a file. In technical terms,

A checksum is a small-sized datum from a block of digital data for the purpose of detecting errors which may have been introduced during its transmission or storage.

Well, checksum is a long string of data containing various letters and numbers. You’ll generally find them while downloading files from the web, e.g. Linux distribution image, software packages etc.

Most common use of checksum is in checking if the downloaded file is corrupted.

For instance, Ubuntu MATE download page includes SHA256 checksum for every image available there. So, after you downloaded an image, you can generate SHA256 checksum for it and verify if the checksum value matches the one mentioned on the site.

If it doesn’t, that will mean your downloaded image’s integrity is compromised (maybe it was corrupted during the download process). We will use Ubuntu Mate “ubuntu-mate-16.10-desktop-amd64.iso” image file for this guide.


Checksum is generated by checksum algorithm. Without going into technical details let’s say that it takes a file as input and outputs the checksum value of that file. There are various algorithms for generating checksum. Most popular checksum algorithms are:

  • Secure Hash Algorithms and variants (SHA-1, SHA-2 etc.) and
  • MD5 Algorithm


If you are looking for graphical solution, you can use GtkHash.

GtkHash is a nifty tool for generating and verifying various checksums. It supports a wide range of checksum algorithms – including SHA, MD5 and others. Here’s a list of supported algorithms:

GtkHash supported Checksum Algorithms


For installing GtkHash on your Ubuntu system, simply run the following command:

sudo apt install gtkhash

That’s it.

GtkHash with UbuntuMATE iso


Every Linux distribution comes with tools for various checksum algorithms. You can generate and verify checksum with them. The command-line checksum tools are the followings:

  • MD5 checksum tool is called: md5sum
  • SHA-1 checksum tool is called: sha1sum
  • SHA-256 checksum tool is called: sha256sum

There are some more available, e.g.: sha224sum, sha384sum etc. All of them uses similar command formats. Let’s see an example of using sha256sum. We will use the same “ubuntu-mate-16.10-desktop-amd64.iso” image file as we used before.


First go to the directory where the .iso image is stored:

cd ~/itsfoss

Now, for generating SHA256 checksum, enter the following command:

sha256sum ubuntu-mate-16.10-desktop-amd64.iso

You will get the SHA256 checksum in your terminal window! Easy, isn’t it?

Generating SHA256 Checksum for UbuntuMATE iso

If the generated checksum matches with the one provided on the UbuntuMATE download page, that will mean – no data was changed while you downloaded the file or putting otherwise, your downloaded file is not corrupted.

The other mentioned tools work similarly.


If you are wondering, how accurately does these checksum detects corrupted files – if you delete or change even one character from any one of the text files inside the iso image, the checksum algorithm will generate a totally different checksum value for that changed iso image. And that will definitely not match with the checksum provided on the download page.


Have you ever gotten that horrible feeling? The one you get when you realize that you accidentally deleted files and it’s not even in the trash? Often it is immediately preceded by denial: I know I have another copy of it somewhere.

But rather than going through all the stages of grief, don’t worry. And remember you’re not alone; sooner or later everyone does this.

“Don’t worry?” you counter, “I just erased the only copy of my resume!”

No really, don’t worry. All that’s happened is that it’s been bumped off a list. So long as you don’t write onto the drive, it absolutely still exists. In fact, depending on the size of the file and the free space on your drive deleted files can persist indefinitely—even if you do write on the drive.

“Yes, fine” you say, “I’ll rest easy knowing my resume ‘exists’ in some abstract sense. But so far as I’m concerned if I can’t open, edit or print from it, it doesn’t exist in any practical sense. What would really help would be a way to ‘un-delete’ files. And one that doesn’t require an IT forensics lab.”

Really, don’t worry—you don’t need a lab to recover the deleted files. Furthermore, if you can get past using a primitive GUI, it’s actually easy to do! I’ll show you how to use TestDisk to recover deleted files.


How to recover deleted files in Linux

Let me present a simplified example: I took a clean thumb drive added some files, then deleted one. Now, my system has a feature which will directly delete files from removable media, by-passing the “trash” altogether; that is if I choose to “right” click on a file and then choose “delete”. It still presents a warning, but one click on the “yes” button and the file is gone forever. Or appears to be.

But this time I didn’t get that horrible feeling. And no, not because this is a cooked up scenario. I knew that all I had to do was open the terminal type “testdisk” and hit “enter”. When I did this for the first time I had one of my “Linux moments”. Because if you don’t have it—and I didn’t—it tells you how to get it! Just type “sudo apt install testdisk” and enter and you’ll have it in about 10 seconds.


You need to install TestDisk tool first. Most Linux distributions already have this tool in their official repository. In Ubuntu and other Ubuntu based Linux distributions such as Linux Mint, elementary OS etc, you can use the command below to install TestDisk:

sudo apt install testdisk

Arch Linux users can install it from AUR. You can download it for other Linux distributions from the link below:

Download TestDisk

Though I am using Ubuntu in this tutorial, this doesn’t mean it is only to recover deleted files in Ubuntu Linux. The instructions presented here works for other distributions as well.


Run TestDisk in the terminal using the command below:



When you open it, you’ll see something that looks like this. Be patient! The interface is actually straightforward but you do have to carefully read the text. Use the arrow keys to navigate and “enter” to select.

How to recover deleted files in Linux using TestDisk
Select ‘Create a new log file’

Screens that have extra commands will tell you so. Also note that TestDisk 7.0 tends to highlight the next reasonable step. It’s almost always right but do read the screen, since it can’t read your mind. In any case, when it wants you to let it create a log file, indulge it. It’s about to pull you out of a hole.


Now, at this point, if you’re lucky, you should see your drive. And you can proceed to the last steps. But let’s assume you’re not, that you have, say, a multi-boot machine. In this case, ownerships can get blurry, and Testdisk needs your permission to open them. You’ll see something like this:

How to recover deleted files in Linux using TestDisk
Sometimes you may need sudo rights

Select “sudo” and enter your password. Hit “enter” and “enter” again on the next screen to create another log file.


This time Testdisk displays all your drives. Arrow key to the drive in question and hit enter.

How to recover deleted files in Linux using TestDisk
You’ll have to select the drive where you are looking for files


Testdisk has again selected the correct setting. This makes sense since a simple storage device is seldom partitioned. Again hit enter:

How to recover deleted files in Linux using TestDisk


And finally we have to do a little thinking to do. If you read the first screen—and I’ll bet you didn’t—this program isn’t just for recovering deleted files. It’s a powerful disk utility. But if we remember what we’re trying to do the choice is fairly obvious: we’re not trying to fix a disk, we’re trying to recover a file. Select “Advanced” and hit “enter”.

How to recover deleted files in Linux using TestDisk
Select Advanced


At the bottom of the page choose “Undelete” and get ready to see a ghost!

How to recover deleted files in Linux using TestDisk
Select Undelete


Testdisk will scan for files and produce a list of deleted files highlighted in red. Arrow down to it and carefully read the choices at the bottom.

How to recover deleted files in Linux using TestDisk


Again, bear in mind that Testdisk is a multi-function tool. Most of these options deal with groups of files; we only want our damn resume back! So hit “c”.

How to recover deleted files in Linux using TestDisk
Hit C to copy and thus recover the deleted file

As you can see from the scoreboard, we’ve won 1-0. After hitting “c” there are options about where you might want to recover the file to, but it defaults to your home folder. And again this is generally the best thing to do. Navigating in Testdisk is a little tricky, whereas dragging and dropping after the fact is a breeze.


First, if you find yourself somewhere you don’t want to be, hit “q” for quit. This won’t close the program, instead, it will act like the “back” button on a program with a full blown GUI, and put you back a page. And just like a “back” button repeating will eventually lead you back to the beginning.

Second, as with anything, the fewer the distractions, the easier it is to find what you’re looking for. In other words, physically detach all other storage drives. In graphically simple environments simplicity is your friend.

Finally, Testdisk can also help you retrieve files that have become inaccessible for other reasons. In fact, this is why I started using the program in the first place. I was trying to save files from a corrupted drive that could not be made to boot. Normally it’s simply a matter of removing said drive any hooking it up to a USB adapter. You can then mount it on another PC and copy the files where ever you want.

But what if the drive is formatted to LVM? This was my problem because a mounted LVM drive looks nothing like a normal Linux OS. None of the usual files appear, and hunting around simply doesn’t help. This, among other reasons, is because most Linux file managers can no longer read ext.2 file systems.

Nevertheless, after a few false starts, I was able to find and save the missing files. Note, however, that the sequence of steps here will be a little different, you may need to use the “analyze” option for Testdisk to make sense of the drive and you may have to poke around a little to find the “home” folder once you do. Furthermore, the files you’re looking for will not appear in red since they were never deleted in the first place. But once you do find them, the copying procedure is basically the same.

With Testdisk and a little luck, you may never lose your resume again as you can always recover deleted files in Linux.


When you switch to Linux, the experience could be overwhelming at the start. Even the basic things like installing applications in Ubuntu could seem confusing.

Don’t worry. Linux provides so many ways to do the same task that it is only natural that you may seem lost, at least in the beginning. You are not alone. We have all been to that stage.

In this beginner’s guide, I’ll show most popular ways to install software in Ubuntu. I’ll also show you how to uninstall the software you had installed earlier.

I’ll also provide my recommendation about which method you should be using for installing software in Ubuntu. Sit tight and pay attention. This is a long article, a detailed one which is surely going to add to your knowledge.


I am using Ubuntu 16.04 running with Unity desktop environment in this guide. Apart from a couple of screenshots, this guide is applicable to all other flavors of Ubuntu.


The easiest and most convenient way to find and install software in Ubuntu is by using Ubuntu Software Center. In Ubuntu Unity, you can search for Ubuntu Software Center in Dash and click on it to open it:

Run Ubuntu Software Center
Run Ubuntu Software Center

You can think of Ubuntu Software Center as Google’s Play Store or Apple’s App Store. It showcases all the software available for your Ubuntu system. You can either search for an application by its name or just browse through various categories of software. You can also opt for the editor’s pick. Your choice mainly.

Installing software in Ubuntu using Ubuntu Software Center

Once you have found the application you are looking for, simply click on it. This will open a page inside Software Center with a description of the application. You can read the description, see its raiting and also read reviews. You can also write a review if you want.

Once you are convinced that you want the application, you can click on the install button to install the selected application. You’ll have to enter your password in order to install applications in Ubuntu.

Installing software in Ubuntu: The easy way
Check details and then install software

Can it be any easier than this? I doubt that.


Tip: As I had mentioned in things to do after installing Ubuntu 16.04, you should enable Canonical partner repository. By default, Ubuntu provides only those softwares that come from its own repository (verified by Ubuntu).

But there is also a Canonical Partner repository which is not directly controlled by Ubuntu and includes closed source proprietary software. Enabling this repository gives you access to more software. Installing Skype in Ubuntu is achieved by this method.

In Unity Dash, look for Software & Updates.

Ubuntu Software Update Settings

And in here, under Other Software tab, check the options of Canonical Partners.

Enable Canonical partners in Ubuntu 14.04
Enable Canonical partners to access more software


We just saw how to install software using Ubuntu Software Center. How about removing software that you had installed using this method?

Uninstalling software with Ubuntu Software Center is as easy as the installation process itself.

Open the Software Center and click on the Installed tab. It will show you all the installed software. Alternatively, you can just search for the application by its name.

To remove the application from Ubuntu, simply click on Remove button. Again you will have to provide your password here.

Uninstall software installed in Ubuntu
Find installed software and remove them


.deb files are similar to the .exe files in Windows. This is an easy way to provide software installation. Many software vendors provide their software in .deb format. Google Chrome is such an example.

You can download .deb file from the official website.

Downloading deb packaging

Once you have downloaded the .deb file, just double click on it to run it. It will open in Ubuntu Software Center and you can install it in the same way as we saw in section 1.1.

Alternatively, you can use a lightweight program Gdebi to install .deb files in Ubuntu.

Once you have installed the software, you are free to delete the downloaded .deb file.

Tip: A few things to keep in mind while dealing with .deb file.

  • Make sure that you are downloading the .deb file from the official source. Only rely on the official website or GitHub pages.
  • Make sure that you are downloading the .deb file for correct system type (32 bit or 64 bit). Read our quick guide to know if your Ubuntu system is 32 bit or 64 bit.


Removing software that was installed by a .deb file is the same as we saw earlier in section 1.2. Just go to Ubuntu Software Center, search for the application name and click on remove to uninstall it.

Alternatively, you can use Synaptic Package Manager. Not necessarily but this may happen that the installed application is not visible in Ubuntu Software Center. Synaptic Package Manager is lists all the software that are available for your system and all the software that are already installed on your system.This is a very powerful and very useful tool.

This is a very powerful and very useful tool. Before Ubuntu Software Center came into existence to provide a more user-friendly approach to software installation, Synaptic was the default program for installing and uninstalling software in Ubuntu.

You can install Synaptic package manager by clicking on the link below (it will open Ubuntu Software Center).

Install Synaptic Package Manager

Open Synaptic Manager and then search for the software you want to uninstall. Installed softwares are marked with a green button. Click on it and select “mark for removal”. Once you do that, click on “apply” to remove the selected software.

Using Synaptic to remove software in Ubuntu


You might have noticed a number of websites giving you a command like “sudo apt-get install” to install software in Ubuntu.

This is actually the command line equivalent of what we saw in section 1. Basically, instead of using the graphical interface of Ubuntu Software Center, you are using the command line interface. Nothing else changes.

Using the apt-get command to install software is extremely easy. All you need to do is to use a command like:

sudo apt-get install package_name

Here sudo gives ‘admin’ or ‘root’ (in Linux term) privileges. You can replace package_name with the desired software name.

apt-get commands have auto-completion so if you type a few letters and hit tab, it will provide all the programs matching with those letters.


You can easily remove softwares that were installed using Ubuntu Software Center, apt command or .deb file using the command line.

All you have to do is to use the following command, just replace the package_name with the software name you want to delete.

sudo apt-get remove package_name

Here again, you can benefit from auto completion by pressing the tab key.

Using apt-get commands is not rocket science. This is in fact very convenient. With these simple commands, you get acquainted with the command line part of Ubuntu Linux and it does help in long run. I recommend reading my detailed guide on using apt-get commands to learn in detail about it.


PPA stands for Personal Package Archive. This is another way that developers use to provide their software to Ubuntu users.

In section 1, you came across a term called ‘repository’. Repository basically contains a collection of software. Ubuntu’s official repository has the softwares that are approved by Ubuntu. Canonical partner repository contains the softwares from partnered vendors.

In the same way, PPA enables a developer to create its own APT repository. When an end user (i.e you) adds this repository to the system (sources.list is modified with this entry), software provided by the developer in his/her repository becomes available for the user.

Now you may ask what’s the need of PPA when we already have the official Ubuntu repository?

The answer is that not all software automatically get added to Ubuntu’s official repository. Only the trusted software make it to that list. Imagine that you developed a cool Linux application and you want to provide regular updates to your users but it will take months before it could be added to Ubuntu’s repository (if it could). PPA comes handy in those cases.

Apart from that, Ubuntu’s official repository often doesn’t include the latest version of a software. This is done to secure the stability of the Ubuntu system. A brand new software version might have a regression that could impact the system. This is why it takes some time before a new version makes it to the official repository, sometimes it takes months.

But what if you do not want to wait till the latest version comes to the Ubuntu’s official repository? This is where PPA saves your day. By using PPA, you get the newer version.

Typically PPA are used in three commands. First to add the PPA repository to the sources list. Second to update the cache of software list so that your system could be aware of the new available software. And third to install the software from the PPA.

I’ll show you an example by using Numix theme PPA:

sudo add-apt-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-gtk-theme numix-icon-theme-circle

In the above example, we added a PPA provided Numix project. And after updating the software information, we add two programs available in Numix PPA.

If you want a GUI application, you can use Y-PPA application. It lets you search for PPA, add and remove software in a better way.

Tip: Security of PPA has often debated. My advice is that you should add PPA from a trusted source, preferably from the official sources.


I have discussed removing PPA in Ubuntu in detail earlier. You should refer to that article to get more insights about handling PPA removal.

To quickly discuss it here, you can use the following two commands.

sudo apt-get remove numix-gtk-theme numix-icon-theme-circle
sudo add-apt-repository --remove ppa:numix/ppa

First command removes the software installed via the PPA. Second command removes the PPA from sources.list.


Installing a software using the source code is not something I would recommend to you. It’s tedious, troublesome and not very convenient. You’ll have to fight your way through dependencies and what not. You’ll have to keep the source code files else you won’t be able to uninstall it later.

But building from source code is still liked by a few, even if they are not developing software of their own. To tell you the truth, last I used source code extensively was 5 years ago when I was an intern and I had to develop a software in Ubuntu. I have preferred the other ways to install applications in Ubuntu since then. For normal desktop Linux user, installing from source code should be best avoided.

I’ll be short in this section and just list out the steps to install a software from source code:

  • Download the source code of the program you want to install.
  • Extract the downloaded file.
  • Go to extracted directory and look for a README or INSTALL file. A well-developed software may include such a file to provide installation and/or removal instructions.
  • Look for a file called configure. If it’s present, run the file using the command: ./configure This will check if your system has all the required softwares (called ‘dependencies’ in software term) to install the program. Note that not all software include configure file which is, in my opinion, bad development practice.
  • If configure notifies you of missing dependencies, install them.
  • Once you have everything, use the command make to compile the program.
  • Once the program is compiled, run the command sudo make install to install the software.

Do note that some softwares provide you with an install script and just running that files will install the software for you. But you won’t be that lucky most of the time.

Also note that the program you installed using this way won’t be updated automatically like programs installed from Ubuntu’s repository or PPAs or .deb.

I recommend reading this detailed article on using the source code in Ubuntu if you insist on using source code.


If you thought installing software from source code was difficult, think again. Removing the software installed using source code could be a bigger pain.

  • First, you should not delete the source code you used to install the program.
  • Second, you should make sure at the installation time that there is a way to uninstall the program. A badly configured program might not provide a way to uninstall the program and then you’ll have to manually remove all the files installed by the software.

Normally, you should be able to uninstall the program by going to its extracted directory and using this command:

sudo make uninstall

But this is not a guarantee that you’ll get this uninstall all the time.

You see, there are lots of ifs and buts attached with source code and not that many advantages. This is the reason why I do not recommend using the source code to install the software in Ubuntu.


There are a few more (not so popular) ways you can install software in Ubuntu. Since this article is already way too long, I won’t cover them. I am just going to list them here:

How to Use Linux Hexdump Command with Practical Examples

Hexdump is a very useful Linux command for developers and application debuggers. It has ability to dump file contents into many formats like hexadecimal, octal, ASCII and decimal. This command takes a file, or any standard input, as input parameter and converts it to the format of your choice. Let’s assume you work with binary data and you are unable to understand the format of a file, you can make use of Hexdump command to get file contents in much better readable format. This command comes pre-installed with all modern day Linux operating systems like CentOS, Fedora, Ubuntu, Debian, Arch Linux etc. In this article, we will be demonstrating the use of hexdump command using various examples. Written in C language, this command might be easy to understand by professional C programmers, but for other IT professionals, it might be a tricky command. We will try to do our best to demonstrate its usage and purpose here in this article.

1) Hexdump -b

Using “-b” switch with Hexdump will display the input offset in hexadecimal format. This option is also called “One-byte octal display”.  The output will be followed by sixteen space-separated, three column, zero-filled, bytes of input data, in octal, per line. Here is the example output we received when we run this command with “-b” switch on a file named “Linuxthegreat”.

# hexdump -b Linuxthegreat
0000000 124 150 151 163 040 151 163 040 040 141 040 164 145 163 164 040
0000010 114 151 156 157 170 151 144 145 040 106 151 154 145 012 125 163
0000020 145 144 040 146 157 162 040 144 145 155 157 156 163 164 162 141
0000030 164 151 157 156 040 160 165 162 160 157 163 145 163 012 012

2) Hexdump -c

This option is referred to as “One-byte character display”. You can use this command parameter to display the input offset in hexadecimal. The output string will be followed by sixteen space-separated,   three column, space-filled, characters of input data per line. Here is the example output of this command.

hexdump -c Linuxthegreat
0000000   T   h   i   s       i   s           a       t   e   s   t
0000010   L   i   n   o   x   i   d   e       F   i   l   e  \n   U   s
0000020   e   d       f   o   r       d   e   m   o   n   s   t   r   a
0000030   t   i   o   n       p   u   r   p   o   s   e   s  \n  \n

3) Hexdump -C

Also known as “Canonical hex+ASCII display”, this shows the input offset in hexadecimal, the output is followed by sixteen space-separated, two column, hexadecimal bytes, along with the same sixteen bytes in %_p format enclosed in “|” characters. Here is working example of this command option.

# hexdump -C Linuxthegreat
00000000  54 68 69 73 20 69 73 20  20 61 20 74 65 73 74 20  |This is  a test |
00000010  4c 69 6e 6f 78 69 64 65  20 46 69 6c 65 0a 55 73  |Linuxthegreat File.Us|
00000020  65 64 20 66 6f 72 20 64  65 6d 6f 6e 73 74 72 61  |ed for demonstra|
00000030  74 69 6f 6e 20 70 75 72  70 6f 73 65 73 0a 0a     |tion purposes..|

4) Hexdump -d

This switch/option shows the input offset in hexadecimal, along with eight space-separated, five column, zero-filled, two-byte units of input data. The output is in unsigned decimal per line. It is also referred to as “Two-byte decimal display”  mode. Here is example output of this command.

 hexdump -d Linuxthegreat
0000000   26708   29545   26912   08307   24864   29728   29541   08308
0000010   26956   28526   27000   25956   17952   27753   02661   29525
0000020   25701   26144   29295   25632   28005   28271   29811   24946
0000030   26996   28271   28704   29301   28528   25971   02675   00010

5) Hexdump -o

Also known as “Two-byte octal display”, it shows the specified input offset in hexadecimal. The output of the command is followed by eight space-separated, six column, zero-filled, two byte quantities of input data, in octal, per line.

# hexdump -o Linuxthegreat
0000000  064124  071551  064440  020163  060440  072040  071545  020164
0000010  064514  067556  064570  062544  043040  066151  005145  071525
0000020  062145  063040  071157  062040  066545  067157  072163  060562
0000030  064564  067157  070040  071165  067560  062563  005163  000012

6) Hexdump  -x

It shows the offset in hexadecimal, followed by eight, space separated, four column, zero filled, two-byte quantities of input data, in hexadecimal. It is referred to as “Two-byte hexadecimal display”.

# hexdump -x Linuxthegreat
0000000    6854    7369    6920    2073    6120    7420    7365    2074
0000010    694c    6f6e    6978    6564    4620    6c69    0a65    7355
0000020    6465    6620    726f    6420    6d65    6e6f    7473    6172
0000030    6974    6e6f    7020    7275    6f70    6573    0a73    000a

7) Hexdump  -v

By default, hexdump uses the asterisk sign (*) to replace the identical line in the output string, but -v option causes hexdump to display all input data. This option is useful when performing the analysis of complete output of any string or text. This command can be used in shell /bash scripts as well for better automation of your desired tasks.

8) Hexdump -s

“Hexdump -s” displays only specified number of bytes from a file, the general syntax to use this option is as follows.

hexdump -s n -c  File

Where, replace “n” with number of lines you want displayed, and “File” with your actual file name. Following example output should further clarify this concept.

# hexdump -s 1 -c  Linuxthegreat
0000001   h   i   s       i   s           a       t   e   s   t       L

The above command will display only one line of output.

You can get more details about hexdump using its help manual. Simply type following command on your Linux system’s terminal and it will display all possibilities and option which can be used with hexdump.

man hexdump


Hexdump is pretty useful utility for system administrators and programmers. It makes analyzing and decoding the various file formats a piece of cake. It can be easily used in bash programming or C programming language scripts to perform complex tasks of file format conversions or analysis and reverse engineering. In this article, we have introduced to hexdump, its useful options and some useful demonstration of the commands related to this utility. Hope you enjoyed this article. If you have any comments or questions, feel free to let us know in comments.

Pet – A Command Line Snippet Manager for Linux

If you manage a lot of Linux systems via command line, you must be aware of the hectic task to remember all the commands you use on daily basis. You often need to go into your system’s history and find the required commands from there. Pet is a command line based tool which makes a system administrator’s life easy. It is an easy to use snippet manager, which saves your command snippets and you can easily view and use them when needed. Command line junkies find this tool extremely important, it is completely a freeware script, the setup process is pretty simple and it runs on almost all flavors of Linux operating system as well as Mac OS. It is built using the well known Go programming language and requires some python modules like Peco and brew to work properly. It is written by Teppei Fukuda and its source code is available on Github. In this tutorial, we will discuss its prominent features, installation process, and some usage example. Stay with us, it’s going to be an interesting session.

Important Features of Pet

Here are some of the noteworthy features of this utility, it can:

  • register your new command snippets pretty quickly.
  • search through the local repository of command snippets.
  • easily edit and run command snippets.
  • use Gist (GitHub-based online code repository) to sync your snippets.

Feeling excited? Let’s get started on its installation and configuration process now.

Installing and Using Pet

We will be demonstrating the installation and usage process of Pet on Ubuntu 16.10 system, the same set of instructions should work for any older version of Ubuntu and Debian based systems. As mentioned in the introductory paragraph, it requires Peco and brew to work properly. Run following two commands respectively to install Brew and Peco on your Linux system.

sudo apt-get install linuxbrew-wrapper
sudo brew install peco

Once the pre-requisites have been properly installed, run following command to download the source file for Pet.

sudo wget

Depending on your network speed, it should take a couple of minutes to complete the download process. Run the following mentioned command to unzip the downloaded file.


Once the unzip process is complete, you should be able to see an executable script, named “pet” here. Run the following command to copy this script file to proper location so it may be available for use for all users.

sudo cp pet /usr/local/bin

There you go, Pet has been configured successfully now. Run “pet” command on the terminal to verify that it is working properly. Expected output should be as depicted in the following screenshot.


Let’s demonstrate some examples, in order to add the new snippets, use the following command:

pet new

It will prompt you the two details, “Command” and “Description”. I have following command I often use on my Linux web servers to identify if my server is under DDOS attack or not.

netstat -nap | grep \:80\  | awk ‘{print $5}’ | tr “:” ” ” | awk ‘{print $1}’ | sort | uniq -c | sort -n

Below screenshot will clarify how I added this snippet to Pet.

pet add

Similarly, you can use the following command to list the currently added snippets.

pet list

You can search through added snippets using the following command:

pet search

You can easily register the previously executed commands to the pet database by edit your .zshrc file. Use vi or vim editor to open the .zshrc file and append the following lines there:

function prev() {
PREV=$(fc -lrn | head -n 1)
sh -c “pet new `printf %q “$PREV”`”

Now you don’t need to add each command manually to Pet, your system will automatically add all the commands you use to the snippet manager. Your daily work life is lot easy now 🙂

Sync Snippets to Gist

As mentioned in the feature list, you can sync your snippets with online Gist repository, for this purpose you must have a Github account, once you have GitHub account, you can get a GIST Token easily. Use the following command to sync your snippets to Gist, it will prompt for Token ID and you should be good to go.

 pet sync -u

Here is the sample output of this command:

 pet sync -u
Gist ID: 1P93IUdf4e06d117097en976BHY
Upload success

Similarly, you can download your snippets from Gist to your system using the following command. It is pretty useful when you want to migrate your snippet data to any other system.

pet sync

Hope you enjoyed this article, we have discussed all possible usages of Pet utility here. It is an extremely lightweight, easy to use, and stable utility which is a must-have application for any command line Linux lover. It is under continuous development and we hope to see many improvements to this application in near future. If you have any questions or feedback, fee free to let us know in the comments section of this article.