How to Install Kali Linux

How to Download and Install Kali Linux in VirtualBox

This tutorial guides you through setting up a secure testing environment using Kali Linux and VirtualBox. It's an ideal way to practice ethical hacking without affecting your main system.

Prerequisites

Before starting, make sure you have:

  • A host operating system (Windows, Linux, or macOS)

  • Internet connection

  • At least 4 GB of RAM and 20 GB of free space (more is better)

  • Desire to learn (and break things in a safe environment)


Step 1: Download VirtualBox

  1. Visit: https://www.virtualbox.org/wiki/Downloads

  2. Choose your operating system (Windows, macOS, Linux)

  3. Install following the wizard


Step 2: Download the Kali Linux Image

  1. Go to: https://www.kali.org/get-kali/

  2. Download the pre-configured VM for VirtualBox (.OVA format). Usually weighs between 3-5 GB

  3. Verify the hash if you want to ensure it wasn't tampered with

  4. When it's time to choose, click on "virtual machines"

  1. Once inside, you have to choose depending on your virtualizer. In this case VirtualBox


Step 3: Import Kali Linux into VirtualBox

  1. Open VirtualBox

  2. Menu: Import or Add in English

  3. Select the file you downloaded

  4. Click next, and accept the default configuration or customize it


Step 4: Initial Configuration

Once imported:

  1. Select the VM and click Start

  2. Use the default credentials:

    • Username: kali

    • Password: kali

Ready! You can now start!


Detailed OVA Installation Process

Import the OVA File

  1. Click the import button

  1. Where it says 'file', search for the file you downloaded and click open

  1. Customize settings (optional). For example, increase the RAM by double-clicking and setting a higher value

  1. Once finished, click Finish

  1. Wait for the import process to complete

  1. On the left side you'll see your imported VM. Select it and click Start

  1. You should see the Kali login screen:

    • User: kali

    • Password: kali


How to Share Folders Between VM and Host

Create a Shared Folder

  1. Create a folder from the console (or file explorer):

mkdir /home/kali/sharedfolder
  1. Select your VM and click Settings

  1. Click on Shared Folders, then the small + button

Configure Shared Folder Settings

You need to complete 3 options:

  • Folder Path: The path of the folder you want to share

    • Windows: C:\thePath\of\folder

    • Linux/macOS: /path/to/folder

  • Folder Name: Must match exactly (case-sensitive)

  • Mount Point: Path in the VM (e.g., /home/kali/sharedfolder)

Important settings:

  • Read-only: false (so both can write)

  • Auto-mount: true (no manual mounting needed)

  • Make Permanent: true (persistent across reboots)

  1. Click OK

Now you can create files on either system and see them on the other!


Extra Tips

Snapshots

Create Snapshot

A snapshot is a 'photo' of your machine. If you break something, you can restore this version.

After clicking 'Take', provide:

  • Name for the snapshot

  • Description (optional) to remember what this snapshot represents

Restore Snapshot

If something breaks, restore a previous snapshot:


Update Kali Linux

  1. Open the terminal:

    • Keyboard shortcut: Ctrl + Alt + T

    • Or click the terminal icon:

  1. Run the update command:

sudo apt update && sudo apt upgrade
  1. Press Enter and follow the prompts


Final Notes

  • Always create snapshots before major changes

  • Keep your Kali Linux updated for the latest tools

  • Use shared folders for easy file transfer

  • Practice in a safe, isolated environment

Happy ethical hacking!

Last updated