0

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

DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
VERSION="2018.2"
ID_LIKE=debian
7
  • What debian version are 18.2? That's can be a Ubuntu version but not a debian one. Maybe you're using a derivated distribution who doesn't have aptitude. Also, aptitude is only a "friendly" interface for apt-get Dec 8, 2018 at 2:41
  • @SakuraKinomoto i meant 2018.2 no it's Debian i am sure
    – Jwan
    Dec 8, 2018 at 11:46
  • Can you do a "cat /etc/os-release" or "lsb_release -da" and update your question with the result? Dec 8, 2018 at 11:49
  • @SakuraKinomoto just did
    – Jwan
    Dec 8, 2018 at 12:10
  • 1
    That's explain it, it's Kali linux, not Debian. Dec 8, 2018 at 12:22

1 Answer 1

1

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 http://http.kali.org/kali kali-rolling main non-free contrib

(You can check a list of mirrors here: http://http.kali.org/README.mirrorlist). 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.