The Advanced Packaging Tool (APT) is used for installing or upgrading packages, along with all of the required dependencies. The APT can also be used to upgrade a complete distribution of Kali:
- apt-get update or apt update: This command is used to synchronize the local package index files with their sources, as defined in /etc/apt/sources.list. The update command should always be used first, before performing an upgrade or dist-upgrade.
- apt-get upgrade or apt upgrade: This command is used to install the newest versions of all packages installed on the system using /etc/apt/sources.list. The upgrade command will not change or delete packages that are not being upgraded, and it will not install packages that are not already installed. The -y switch is used, with this command, to automatically accept the prompt messages.
- apt-get dist-upgrade or apt dist-upgrade: This command upgrades all packages currently installed on the system, and their dependencies. It also removes obsolete packages from the system. The -y switch is used, along with this command, to automatically accept the prompt messages.
To fully upgrade your Kali Linux OS, use the following commands:
apt update
apt dist-upgrade -y
reboot
You can combine the three preceding commands into one command by using && apt update && apt dist-upgrade -y && reboot.
- To show the full description of a package and identify its dependencies, use the following:
apt-cache show [package name]
- To remove a package from Kali, use the following:
apt-get remove [package name]
- To install an application from the repository, use the following:
apt-get install [application name]
Sometimes, you will download applications from the web, and you will need to install them using the following command:
./configure && make && make install
./configure && make && make install
If you want to download a tool package from the GitHub repository, use the following command (to get the URL, on the repo homepage, click the Clone or download button, and the URL will be revealed):
git clone [Github repo URL]