Kali Linux – sources.list and update

In Unix systems, repositories are called source software, of which the package manager downloads and installs programs. The list of Debian (and its derivatives) is located in: /etc/apt/sources.list and files in the directory /etc/apt/sources.list.d/. The format of the file is:

{type} {adres} {system version} {section1} {section2} {section3}


  • {type}

    – is kind of repository distinguish repositories of binary packages (deb), ready to use, and repositories of source packages (deb-src)

  • {adres}

    – repository address, it is usually http or ftp server can also be a local repository (file: //) or CD / DVD

  • {system version}

    – version used by our system, for example. Stable, testing, unstable. In most cases (in the case of official repositories always) may also be a code, for example: etch, lenny, sid

  • {section}

    – packages group, for example. main (main section includes packages comply with the Debian Free Software Guidelines), non-free (contains the packages non-free), contrib (includes packages free, in line with the DFSG, but somehow depend on packages in non-free). Sections may be given in any order.

nano /etc/apt/sources.list

In sources.list file we can add one line:

deb http://http.kali.org/kali kali-rolling main contrib non-free

This one allows to update and install new repositories for Kali Rolling users.

Why kali-rolling repository ? Answer from kali.org:

In contrast to kali-dev, kali-rolling is expected to be of better quality because it’s managed by a tool that ensures installability of all the packages it contains. The tool picks updated packages from kali-dev and copies them to kali-rolling only when they have been verified to be installable. The repository is also fed by a stream of tool updates, of which we get notified via our upstream git tagging watch list.

After set up our repository in sources.list file we can easily update system by:

apt-get update && apt-get upgrade


Kali will now check servers for updates. If there any repositories (and it will because we just have a fresh, new system in a virtual environment), it will ask you to install them. Sometimes I can remember the whole command to execute I use permanent aliases. I will create some article: how to create a permanent alias.(status: in progress …)

During installation Kali will ask for restart services during update repositories:
restarted services

When list of all repositories will be updated, we can use:

shutdown -r now

to restart our machine. Now all repositories should be updated. If you will some problems during update, please leave comment below.


How to set up Kali Linux on Virtual Box

The purpose of this guide is to show how step by step install Kali Linux on VirtualBox. Kali Linux is very useful tool 😉


Open VirtaulBox and create the virtual machine by clicking on: ‘New’ or ‘CTRL + N’. When new window appears choose:

  • name for your virtual machine
  • type and version on an operating system: Linux, Debian(32 bit)/ Debian(64 bit)


Set memory at least 512MB. I set more than 700MB but after first run always change to a higher number. It always depends on how memory you have on a host machine.


Select option: ‘Create a virtual disk now’ and then click on: ‘Create’.


On this window, you can  select a few options, but I recommend to choose VMDK. Other options:

  • VDI  (VirtualBox Disk Image) – virtual disk image file in VirtaulBox systems
  • VHD (Virtual Hard Disk) – virtual hard disk drive, VHDs are implemented as files that reside on the native host file system, used by Microsoft
  • HDD (Parallels Hard Disk) – format used by commercial software “Parallels Workstation” Company “Parallels, Inc.”.
  • QED (QEMU enhanced disk) – format-specific virtual machine (KVM) based on the Linux kernel
  • QCOW (QEMU Copy-On-Write) – format used to obtain virtual storage space. This mechanism allows for a significant reduction in disk space requirements in a situation where the same image of the hard disk is used by many virtual machines and helps to increase productivity, as it reads from the disk is stored in the cache located in the RAM and the memory serves request readings from other virtual machines.


Select: ‘Dynamically allocated’. This option allows changing memory according to the requirements.


In: ‘Processors’ option select: ‘Enable PAE/NX’. Reserving for 32-bit memory larger than 4 GB require the use of Enable PAE / NX.


After starting virtual machine select locations of *.iso file with Kali Linux.


Select: ‘Install’ option and press ENTER key.


Select location.


Choose keyboard.


In this step yu can choose: ‘Continue’.


This is optional. You can skip this option.


Set up password.


Re-enter password.


Choose: ‘Guided – use entire disk’.


Confirm the disk partition.


Select partition schema. Choose first option.


Select: ‘Yes’ option to write changes to disk.


System installation starts. In the middle of the process, two windows will appear.  First with network mirror and second with installing the GRUB boot loader installation on a hard drive.


After reboot enter username as: ‘root’ and password configured previously.


 If you have some problems with installation, please leave comment below.