Guides

Apt this Apt that!

One thing that I found quite hard to deal with when I started using Linux coming from a Windows background was the package manager. I thought I would run through some basics here to give people a kick start on their journey!

In the Linux world the operating systems have repositories that are maintained, think of this like the windows update catalogue (but it includes way more). Here we have all the OS files (packages) and application (packages).

Sources.List

Aptitude uses a configuration file (remember everything in Linux is a file) to specify the location of the repositories. For more on this check out https://wiki.debian.org/Aptitude

We can review our current configuration by using cat /etc/apt/sources.list

What you will notice is that Kali uses http by default (crazy a bit but hey ho)

Encrypt all my traffic

Back in 2017 the Kali team added more support for HTTPS! (yay)

https://www.kali.org/news/kali-linux-repository-https-support/

To enable this, we must run the following:

sudo apt install apt-transport-https

Now that’s deployed we need to update our soures.list file

sudo sed -i ‘s/http:/https:/g’ /etc/apt/soruces.list

Now we can run sudo apt update

And we can see we are using https

Common Aptitude Package Manager Commands

Now we have already used a few commands but let’s take a look at the common commands we are going to be using in our daily hacking life!

sudo apt update update the list of packages from the source.list repositories
sudo apt upgrade upgrade all packages
sudo Apt dist-upgrade upgrade all packages regardless of dependencies
sudo apt list — Installed show all installed packages
sudo apt install xxxxxxxxx install a package name (xxxxxxx)
sudo apt remove xxxxxxxxxxx remove a package
sudo apt autoremove auto remove any unrequired packages

VM Tools

Now we’ve had a go and have set HTTPS and understand a few common package manager commands let’s give it a go!

We can append a -y to answer YES automatically!

Summary

So today we looked at upgrading our connections to the KALI repos to HTTPS and then we looked at some basic package manager commands! Package management and dependencies clearly can become quite complex so make sure you read up more on this subject but for now hopefully this post will get you started on your journey! Remember to check back for more hints and tips but also check out the youtube channel!

Leave a Reply