linux - Aptitude On Kali Linux - answerstu - answerstu

Aptitude On Kali Linux

I have just installed Kali Linux 2018.2 and tried to search some installed packages on it as i do on Ubuntu

aptitude search *package name*

but it seems like this command does not work on Kali Linux.

I have also tried to install Aptitude

/bin/sh -c 'apt-get install -y aptitude'

but with no success :

E: Package 'aptitude' has no installation candidate

if Aptitude does not exist on Kali Linux, is there any other alternatives to search the installed packages and the packages that the Kali Linux repositories have?

Output of cat /etc/*-release


1 Answer

  1. Jim- Reply


    As a first response, maybe you didn't have any repository configured. In this case, apt-get will not work at all. You need to add the repositories for your distribution on /etc/apt/sources.list file. The needed repository are:

    deb kali-rolling main non-free contrib

    (You can check a list of mirrors here: Use the best mirror for you.

    I don't know how kali linux manages this, but, I can give some guidelines for using directly apt for do who you request:

    First of all, remember to do a update for getting the latest packages database:

    apt-get update

    For updating all packages:

    apt-get upgrade

    apt-get dist-upgrade <-- If you update to a newer release.

    For doing searches, use apt too. You can use it too for viewing a concrete package information.

    apt-cache search package name

    apt-cache show package name

    For checking if you have a package installed, use dpkg. If the package you're searching for appears on the list (with status / first column as ii) you have it installed:

    dpkg -l | grep package name

    Also, for added information:

    You can use dpkg for search who package owns a file: dpkg -S filename

    You can use dpkg for list files from a package: dpkg -L package

Leave a Reply

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

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>