BackTrack v5r3 was built on Ubuntu, which is a type of Debian Linux. That's important because different Linux systems use different methods for package management (package management means downloading and installing new software packages).

Step 1: Using the GUI Package Manager

The simplest way to install software on BackTrack is to use the GUI package manager. In my KDE-based BackTrack 5, the GUI package manager is called KPackageKit (some of you may have Synaptic).

These package managers enable us find packages, download them, and install them on our system. We can open KPackageKit by navigating to System and then KPackageKit as shown in the screenshot below.

When open, you simply put the name into search field. It will then retrieve all the options fulfilling the criteria of your search, then just click on the icon next to the package you want to download.

In this example, we will be looking for the wireless hacking software, aircrack-ng.

Note that if the package is already installed, there will be an X next to it. If not, there will be a downward-pointing arrow. Click on the arrow and then click on the APPLY button below.

Step 2: Updating Your Repositories

Package managers search in specified repositories (websites housing packages) for the package you are seeking. If you get a message that the package was not found, it doesn't necessarily mean that it doesn't exist, but simply that it's not in the repositories your OS is searching.

BackTrack defaults to searching in backtrack-linux.org where many hacking tools are available. Unfortunately, if you are looking for something that is not a hacking tool or a new hacking tool that BackTrack hasn't yet placed in its repository, you may have to revise where your operating system searching for packages.

This can be done by editing the /etc/apt/sources.list file. Let's open it with KWrite and take a look.

As you can see, BackTrack has three default sources on its sources.list, all pointing to BackTrack repositories. We can add any repository with Linux software to this list, but since BackTrack is a Ubuntu distribution, we might want to add an Ubuntu repository to this list to download and install Ubuntu software. We can do this by adding a single line to this file:

Now when I use my package manager, it will search the three BackTrack repositories first, and if it fails to find the package in any of those places, it will then search for it in the Ubuntu repository.

Step 3: Command Line Package Management

Ubuntu also has a command line package manager called apt. The basic syntax for using apt to download packages is:

apt-get install aircrack-ng

So, let's open a terminal and type the above command to install aircrack-ng (of course, we just need to replace the name of the package to install other software).

If the package is in one of our repositories, it will download it and any of the necessary dependencies (files that the package need to run properly), and install it on your system automatically.

Step 4: Installing from Source

Finally, sometimes you will need to download software that is neither in a repository, nor in a package. Most often these are archived as tar or tarballs. These are files that are "tarred" together into a single file and often compressed (similar to zipping files with WinZip and then putting them together into a .zip file).

Let's say that aircrack-ng was not in our repository (some software never finds its way into a repository) and we had to download it from aircrack-ng.org website. We could download the file aircrack-ng-1.2-beta1.tar.

Once we've downlaoded it, then we need to untar it using the tar command:

tar xvf aircrack-ng-1.2-beta1.tar

This will untar and uncompress it, if it's compressed. Next we need to compile it with the GNU compiler. Compiling from source code will give us binaries (the program files) that are optimized for our hardware and operating system, meaning they will often run faster and more efficiently. We can compile this source code by typing:

gcc aircrack-ng

Finally, we can now run this file from within the directory where we unzipped it:

./aircrack-ng

Note that to run the file, we preceded it with the ./, which tells Linux to execute this file from the directory we are presently in, so make certain you run this command in the same directory that you compiled the source code in.

That should cover all the major ways of installing software and I hope it wasn't too confusing. In most cases, we can simply use the GUI based package manager to install software, but like all things in life, there are exceptions.

In my next tutorial, we'll be looking at networking Linux using BackTrack. If you haven't already, make sure to check out the first four parts of this series, and if you have any questions, ask away in the comments below or hit up the Null Byte forum for more help.

74 Comments

Nice Post, Beside this i want to ask you About Tor Browser Bundle. I installed it as root on backtrack but when i tried to run it it gives me error Tor Browser Bundle Should not be run as a Root. Exiting, After that i made a non-root user with Adduser Command, Then i added it to group with usermod --groups admin,cdrom,audio myusername After all this i login with a non-root user and installed Tor and on giving command ./start-tor-browser it gives me error Unable to open Configuration file "home/myusername/tor-browser-en-US/App/../Data/Tor/torrc." I tried to go to Data/Tor/torrc with non-root user It also gives an error bash: cd: Tor: Permission Denied What should i do to run Tor on Backtrack 5 R3

If it was me, and I'm no professional, but if it was me, I'd sudo apt-get remove toe-browser-bundle if you let the package manager handle the install, or a less pretty way would be to do a find command looking for all tor related files then sudo rm them, then reinstall tor from the user account.

Or you could try changing permissions on all your TOR files. look up chown and chmod for that. It's a more elegant approach, but often is too time consuming at least in my experience.

I dunno, hope this helps, I haven't used a debian-derived distro in ages so I forget how things work there.

IHATEPULLUPS Thank For Replying but i don't know how to use chmod or chown commands. OTW i got it in tar.gz form then i extracted it and gave ./start-tor-browser command. and it gives me this error Unable to open Configuration file "home/myusername/tor-browser-en-US/App/../Data/Tor/torrc." i just started using linux with your lessons

I used chmod a=rwx and gave permission to the file but unexpectedly i gave me another error which states that "this Directory is not owned by this user (some numbers here) but by root(0) perhaps you are running tor as a wrong user" i don't understand where the problem exisit.

I'm in Kali. Plus, sure thing I can directly tar xvf aircrack-ng-1.2-beta3.tar.gz and still get the same result folder as doing gunzip then tar later. I did several times that part. What I don't understand is the tar command extract everything into a folder name aircrack-ng-1.2-beta3 but why you execute gcc aircrack-ng in the parent folder of aircrack-ng-1.2-beta3?

Even when I try gcc in the directory that contains aircrack-ng.c and aircrack-ng.h it doesn't work too.

Instead of the KDE version of BT I got the GNOME version. When I navigate to system tools I don't see either of the programs/tools 'KPackagekit' or 'Synaptic'. I have preformed a find command in the terminal for both and both times it has come back empty.

hi there OTW. i was wondering if you could tell me how to install a torrent download manager im trying to download a dictionary file from your wpa2 tutorial. thanks alot for taking the time to write these how to's its helped me no end to use the linux OS.

Hi OTW. First of all: Great job on all the guides. Cant wait to get through them. Since im only getting started, im using Kali. Should i still add Ubuntu repos or should i add debian repos instead? And where would one find those?

Although I am not a noob in Linux OSes , but I learn something new from this tutorial .That ,locally compiled files run faster than the packages(like .deb , .bundle etc )Thanks for adding this to local repository of my knowledge ;)

Guys . i have a problem here . I had kali linux and worked perfect . somehow i crashed it and now i installed kali linux lite . BUT . i have no text editor suck as gedit or something . and i cannot apt-get nothing . is there any sources.list file i can download to replace the old one so i can download synaptic ?

I just installed Kali on an 8GB thumb drive, and I'm running it from that. I'd like to install new software, but every time I shut down, everything goes away, and I have to start with a default Kali. Is there a place to learn how to make the install persistent?

I installed Kali on an 8GB USB stick with the Mac Linux USB Loader on my Macbook. I wanted to use my Seagate 500GB external drive to do it, but when I tried to use the USB loader, the drive would never show up under the options to install to. It worked fine with the stick, though.

I was wondering if this may be because the drive is to big to install Kali on. I made sure to format as Fat32 and made a Master Boot partition.

Any idea why it wouldn't show up?I appreciate the tutorials and all your help.

Are there any GUI Package Managers for Kali? If so, how would I go about installing them? I have followed guides to install synaptics (which included updating the repositories) and it comes back saying, "Package synaptic is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source...". Should I just stick to using the command line package management? Thanks in advance, I am new to this.