apt-kali is a shellscript wrapper for apt-get and aptitude that can drastically improve apt download times by downloading packages in parallel, with multiple connections per package.
You can quickly install apt-kali
by running:
/bin/bash -c "$(curl -sL https://git.io/fjtUP)"
A manual install can be performed as such:
cp apt-kali /usr/bin/
chmod +x /usr/bin/apt-kali
cp apt-kali.conf /etc
You need to have installed: aria2c wget html-xml-utils netselect
apt-get install aria2 wget html-xml-utils netselect
Then simply run apt-kali instead of apt-get or aptitude.
cp completions/bash/apt-kali /etc/bash_completion.d/
chown root:root /etc/bash_completion.d/apt-kali
. /etc/bash_completion
cp completions/zsh/_apt-kali /usr/share/zsh/functions/Completion/Debian/
chown root:root /usr/share/zsh/functions/Completion/Debian/_apt-kali
source /usr/share/zsh/functions/Completion/Debian/_apt-kali
mkdir -p /usr/share/man/man8/
cp ./man/apt-kali.8 /usr/share/man/man8
gzip -f9 /usr/share/man/man8/apt-kali.8
mkdir -p /usr/share/man/man5/
cp ./man/apt-kali.conf.5 /usr/share/man/man5
gzip -f9 /usr/share/man/man5/apt-kali.conf.5
The apt-kali configuration file is located at: /etc/apt-kali.conf
_APTMGR=apt
Change package manager used for installation. Supported are apt-get, aptitude, apt.
DOWNLOADBEFORE=true
To suppress apt-kali confirmation dialog and download packages directly set this to any value. To ask for confirmation, leave empty. This options doesn't affect package manager confirmation.
_MAXNUM=5
Set to maximum number of connections aria2c uses.
_MAXCONPERSRV=10
Set to maximum number of connections per server aria2c uses.
_SPLITCON=8
Set to maximum number of connections per file aria2c uses.
_MINSPLITSZ=1M
Set to size of each split piece. Possible values: 1M-1024M
_PIECEALGO=default
Set to piece selection algorithm to use. Possible values: default, inorder, geom
DLLIST='/tmp/apt-kali.list'
Location of aria2c input file, used to download the packages with options and checksums.
_DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} -i ${DLLIST} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} --connect-timeout=600 --timeout=600 -m0'
Change the download manager or add additional options to aria2c.
apt-kali uses APT's proxy settings (Acquire::http::proxy
, Acquire::https::proxy
, Acquire::ftp::proxy
) and if those are not available, the environment settings (http_proxy
, https_proxy
, ftp_proxy
). Refer to APT's or the system's documentation.
DLDIR='/var/cache/apt/archives/apt-kali'
Directory where apt-kali downloads the packages.
APTCACHE='/var/cache/apt/archives'
Directory where apt-get and aptitude download packages.
SOURCELIST='/etc/apt/sources.list'
When you use the 'update-source' arg this is where it will add the kaliest kali repo. Source repo will be unlocked by default !!! ANY OTHER KALI REPOS IN SOURCE LIST WILL BE REPLACED !!!
VERBOSE_OUTPUT=y
Show aria2 download file instead of package listing before download confirmation. Unset to show package listing.
cGreen='\e[0;32m'
cRed='\e[0;31m'
cBlue='\e[0;34m'
endColor='\e[0m'
Terminal colors used for dialogs. Refer to ANSI Escape sequences for a list of possible values. Disabled when not using terminal.
Consider apt-kali and all of its derivatives licensed under the GNU GPLv3+.
- Matt Parnell, http://www.mattparnell.com - Copyright: 2008-2012
- Dominique Lasserre - Improvements, maintenance, revisions - 2012, 2017-2018
- Travis/travisn000 - support for complex apt-get commands
- Alan Hoffmeister - aria2c support
- Abhishek Sharma - aria2c with proxy support
- Luca Marchetti - improvements on the locking system and downloader execution
- Richard Klien - Autocompletion, Download Size Checking (made for on ubuntu, untested on other distros)
- Patrick Kramer Ruiz - suggestions
- Sergio Silva - test to see if axel is installed, root detection/sudo autorun, lock file check/creation
- Waldemar {BOB}{Burnfaker} Wetzel - lockfile improvements, separate config file
- maclarke - locking improvements