OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

Installing Packages with APT‌


Although APT is much more advanced than dpkg and does a lot more behind the scenes, you will find that interacting with packages is quite simple. You can add a package to the system with a simple apt install package. APT will automatically install the necessary dependencies:


image

# apt install kali-linux-gpu Reading package lists... Done Building dependency tree

Reading state information... Done

The following additional packages will be installed: oclgausscrack oclhashcat

The following NEW packages will be installed: kali-linux-gpu oclgausscrack oclhashcat

0 upgraded, 3 newly installed, 0 to remove and 416 not upgraded. Need to get 2,494 kB of archives.

After this operation, 51.5 MB of additional disk space will be used. Do you want to continue? [Y/n]

Get:1 http://archive-2.kali.org/kali kali-rolling/non-free amd64 oclhashcat amd64 2.01+

git20160114-0kali2 [2,451 kB]

Get:2 http://archive-2.kali.org/kali kali-rolling/main amd64 oclgausscrack amd64 1.3-1

kali2 [37.2 kB]

Get:3 http://archive-2.kali.org/kali kali-rolling/main amd64 kali-linux-gpu amd64

2016.3.2 [6,412 B]

Fetched 2,494 kB in 0s (3,060 kB/s)

Selecting previously unselected package oclhashcat.

(Reading database ... 317084 files and directories currently installed.) Preparing to unpack .../0-oclhashcat_2.01+git20160114-0kali2_amd64.deb ... Unpacking oclhashcat (2.01+git20160114-0kali2) ...

Selecting previously unselected package oclgausscrack.

Preparing to unpack .../1-oclgausscrack_1.3-1kali2_amd64.deb ... Unpacking oclgausscrack (1.3-1kali2) ...

Selecting previously unselected package kali-linux-gpu. Preparing to unpack .../2-kali-linux-gpu_2016.3.2_amd64.deb ... Unpacking kali-linux-gpu (2016.3.2) ...

Setting up oclhashcat (2.01+git20160114-0kali2) ... Setting up oclgausscrack (1.3-1kali2) ...

Setting up kali-linux-gpu (2016.3.2) ...


You can also use apt-get install package, or aptitude install package. For simple pack- age installation, they do essentially the same thing. As you will see later, the differences are more meaningful for upgrades or when dependencies resolution do not have any perfect solution.

If sources.list lists several distributions, you can specify the package version with apt install package=version, but indicating its distribution of origin (kali-rolling, kali-dev, or kali-bleeding- edge) with apt install package/distribution is usually preferred.

As with dpkg, you can also instruct apt to forcibly install a package and overwrite files with --force- overwrite, but the syntax is a bit strange since you are passing the argument through to dpkg:


# apt -o Dpkg::Options::=”--force-overwrite” install zsh

# apt -o Dpkg::Options::=”--force-overwrite” install zsh

Top OS Cloud Computing at OnWorks: