Kali Linux On VirtualBox: A Step-by-Step AMD64 Guide
Hey guys! Ever wanted to dive into the world of cybersecurity and ethical hacking? One of the best ways to get started is by using Kali Linux. And whatâs even cooler? Running it inside VirtualBox! This guide will walk you through setting up Kali Linux AMD64 on VirtualBox, step by simple step. Let's get started!
Why Kali Linux and VirtualBox?
Before we jump into the how-to, letâs quickly cover the why. Kali Linux is a Debian-based distribution specifically designed for digital forensics and penetration testing. It comes packed with tons of tools you'll need for cybersecurity tasks.
VirtualBox, on the other hand, is a powerful virtualization tool that allows you to run operating systems within your current operating system. Think of it as having a computer inside your computer. This is super useful because:
- Isolation: Kali Linux runs in a separate environment, so you donât mess up your main system.
- Safety: You can play around with potentially risky tools and scripts without worrying about damaging your primary OS.
- Flexibility: You can easily create, clone, and delete Kali Linux instances as needed.
Using Kali Linux within VirtualBox provides a safe and flexible environment for learning and experimenting with cybersecurity tools. Setting it up is easier than you might think, and this guide will ensure you have a smooth experience. So, buckle up, and let's get this show on the road!
Step 1: Download VirtualBox
First things first, you'll need to download VirtualBox. Head over to the VirtualBox website and grab the version that matches your host operating system (Windows, macOS, or Linux). Make sure you download the latest version to ensure you have all the newest features and security updates.
Once the download is complete, run the installer. The installation process is pretty straightforward. Just follow the on-screen instructions. Here are a few tips:
- On Windows, you might see a warning about network interfaces. This is normal; VirtualBox needs to create virtual network adapters. Just click âYesâ to continue.
- You can leave most of the installation options at their default settings.
- After the installation, you might be prompted to restart your computer. Itâs a good idea to do this to ensure everything is set up correctly.
After restarting, launch VirtualBox. You should see the VirtualBox Manager window. This is where you'll manage your virtual machines. Now that VirtualBox is installed, we can move on to downloading Kali Linux.
Step 2: Download Kali Linux AMD64
Next up, you need to download the Kali Linux image. Go to the Kali Linux downloads page. Since you're following this guide, you'll want to download the Kali Linux 64-bit (AMD64) version. There are a couple of options here:
- Installer image: This is a full ISO image that you can use to install Kali Linux from scratch inside VirtualBox.
- VirtualBox image: This is a pre-built virtual machine image thatâs ready to run in VirtualBox. This is often the easiest option for beginners.
For this guide, weâll use the installer image to give you a better understanding of the installation process. Click on the installer image link to start the download. The file is quite large (several gigabytes), so it might take a while depending on your internet speed. Grab a coffee, stretch your legs, and let it download.
While you're waiting, verify the integrity of the downloaded ISO image. This ensures that the file hasn't been corrupted during the download process. Kali Linux provides SHA256 checksums for each image. You can use a checksum tool to calculate the SHA256 hash of the downloaded ISO and compare it to the one listed on the Kali Linux website. If the checksums match, you're good to go! If not, re-download the image.
Step 3: Create a New Virtual Machine in VirtualBox
With both VirtualBox and Kali Linux downloaded, itâs time to create a new virtual machine (VM) in VirtualBox. Hereâs how:
- Open VirtualBox Manager.
- Click on the New button in the toolbar. This will open the âCreate Virtual Machineâ wizard.
- Name and operating system:
- Name: Give your VM a descriptive name, like âKali Linux AMD64â.
- Type: Select âLinuxâ.
- Version: Choose âDebian 10 (64-bit)â or the closest Debian version available.
- Memory size:
- Allocate RAM to the VM. A minimum of 2GB (2048 MB) is recommended, but 4GB (4096 MB) or more is better if you have enough RAM. Donât allocate more RAM than your host system can spare, or it might become unstable.
- Hard disk:
- Select âCreate a virtual hard disk nowâ.
- Hard disk file type:
- Choose âVDI (VirtualBox Disk Image)â.
- Storage on physical hard disk:
- Select âDynamically allocatedâ. This means the virtual hard disk file will grow as needed, rather than taking up all the allocated space from the start.
- File location and size:
- Choose a location for the virtual hard disk file. The default is usually fine.
- Set the size of the virtual hard disk. A minimum of 20GB is recommended, but 30GB or more is better if you plan to install a lot of tools and software.
- Click Create to create the VM.
Now you have a virtual machine ready to go! The next step is to boot it up with the Kali Linux ISO image.
Step 4: Configure the VM and Boot from the Kali Linux ISO
Before starting the VM, letâs tweak a few settings:
- In the VirtualBox Manager, select your âKali Linux AMD64â VM and click on Settings in the toolbar.
- Go to the System tab.
- Under the Processor tab, allocate more CPUs to the VM if possible. Giving it 2 or more CPUs can significantly improve performance.
- Go to the Display tab.
- Increase the Video Memory to the maximum (usually 128 MB or 256 MB). This will improve the graphics performance of the VM.
- Go to the Storage tab.
- Under âController: IDEâ, click on the empty disc icon.
- Click on the disc icon next to âOptical Driveâ and choose âChoose a disk fileâŠâ.
- Browse to the Kali Linux ISO image you downloaded and select it.
- Go to the Network tab.
- Make sure the adapter is enabled.
- The default âAttached to: NATâ setting is usually fine for most users. This allows the VM to access the internet through your host systemâs network connection.
- Click OK to save the settings.
Now youâre ready to boot the VM from the Kali Linux ISO:
- Select your âKali Linux AMD64â VM in the VirtualBox Manager and click on Start in the toolbar.
- The VM will start, and you should see the Kali Linux boot menu.
- Use the arrow keys to select âGraphical Installâ and press Enter.
The Kali Linux installer will now start. Follow the on-screen instructions to install Kali Linux on the virtual hard disk.
Step 5: Install Kali Linux Inside the VM
The Kali Linux installer is pretty straightforward, but here are a few important steps to keep in mind:
- Select a language: Choose your preferred language.
- Select your location: Choose your location.
- Configure the keyboard: Choose your keyboard layout.
- Configure the network: The installer will automatically detect your network settings. If youâre using DHCP (which is common), you donât need to enter anything manually.
- Set up users and passwords:
- Enter a hostname for your system. This is the name that will identify your Kali Linux system on the network.
- Enter a domain name. You can leave this blank if youâre not on a domain.
- Set a root password. This is the password for the root user, which has administrative privileges. Remember this password! Itâs crucial for system administration tasks.
- Create a non-root user. Itâs generally a good idea to use a non-root user for day-to-day tasks and only use the root user when necessary.
- Configure the clock: The installer will automatically configure the clock based on your location.
- Detect disks: The installer will detect the virtual hard disk you created earlier.
- Configure the partition:
- Choose âGuided â use entire diskâ. This is the easiest option for beginners.
- Select the virtual hard disk.
- Choose âAll files in one partition (recommended for new users)â.
- Select âFinish partitioning and write changes to diskâ.
- Confirm that you want to write the changes to disk.
- Install the base system: The installer will now install the base system. This might take a while.
- Configure the package manager:
- Youâll be asked if you want to use a network mirror. If you have a fast internet connection, itâs a good idea to say âYesâ. This will allow you to download updates during the installation process.
- Install GRUB boot loader:
- Youâll be asked if you want to install the GRUB boot loader to the primary drive. Say âYesâ.
- Select the virtual hard disk.
- Finish the installation: The installer will now finish the installation and reboot the system.
After the reboot, you should see the GRUB boot menu. Select âKali GNU/Linuxâ and press Enter. Kali Linux will now start up.
Step 6: Log In and Update Kali Linux
Once Kali Linux has started, youâll see the login screen. Log in using the username and password you created during the installation process. If you didnât create a non-root user, you can log in as the root user using the root password you set earlier.
After logging in, the first thing you should do is update Kali Linux. Open a terminal and run the following commands:
sudo apt update
sudo apt upgrade
The apt update command updates the package lists, and the apt upgrade command upgrades the installed packages to the latest versions. This ensures that your system is up-to-date with the latest security patches and bug fixes.
During the upgrade process, you might be asked to confirm some configuration changes. In most cases, you can just accept the default settings.
After the upgrade is complete, itâs a good idea to reboot the system:
sudo reboot
Step 7: Install VirtualBox Guest Additions (Optional but Recommended)
VirtualBox Guest Additions are a set of drivers and utilities that improve the performance and usability of the virtual machine. They provide features like:
- Improved graphics performance: Better screen resolution and smoother graphics.
- Mouse pointer integration: The mouse pointer moves seamlessly between the host and guest operating systems.
- Shared folders: Allows you to share files between the host and guest operating systems.
- Shared clipboard: Allows you to copy and paste text and files between the host and guest operating systems.
To install VirtualBox Guest Additions, follow these steps:
- Make sure your Kali Linux VM is running.
- In the VirtualBox window, go to Devices > Insert Guest Additions CD imageâŠ.
- Kali Linux will automatically mount the Guest Additions CD image. A file manager window might open showing the contents of the CD.
- Open a terminal and navigate to the directory where the Guest Additions CD is mounted. The path is usually
/media/cdrom0or/mnt/cdrom.
cd /media/cdrom0
- Run the
VBoxLinuxAdditions.runscript as root:
sudo ./VBoxLinuxAdditions.run
- The script will compile and install the Guest Additions. This might take a few minutes.
- After the installation is complete, reboot the system:
sudo reboot
After the reboot, the VirtualBox Guest Additions will be active, and you should notice improved performance and usability.
Conclusion
Congrats, guys! Youâve successfully installed Kali Linux AMD64 on VirtualBox! You now have a safe and isolated environment for exploring the world of cybersecurity. Play around with the tools, practice your skills, and most importantly, have fun! Remember to keep your system updated and explore the many resources available online to continue learning.
Happy hacking (ethically, of course)!