This guide provides two approaches to enabling full-screen mode in VirtualBox for Kali Linux. Choose the method that best suits your needs.
If you're looking for a quick solution without needing advanced features, follow these steps:
- Open Display Settings:
- Click on the Kali menu icon and search for Display.
- Adjust Display Resolution:
- Set the display resolution to your preference.
If the first method doesn't work, or you need advanced functionality, follow these steps.
VirtualBox may not properly detect the Kali Linux ISO, as shown below:
- Kali ISO Not Detected Properly:
- Ubuntu ISO Detected Correctly:
- Navigate to Devices in the VirtualBox menu.
- Click Insert Guest Additions CD or Upgrade Guest Additions.
- Open the CD folder.
- Right-click on any blank area and select Open Terminal.
- Gain root privileges:
- Set a root password (if not already set):
sudo passwd root
- Switch to root:
su
- Set a root password (if not already set):
-
Make the installer executable and run it:
chmod 755 ./VBoxLinuxAdditions.run sh VBoxLinuxAdditions.run
-
If the installation fails, install the required packages:
sudo apt install build-essential linux-headers-$(uname -r) sudo apt install gcc make perl -y
-
Run the installer again:
sh VBoxLinuxAdditions.run
-
Build the kernel modules:
/sbin/rcvboxadd quicksetup all
-
Restart your system:
init 6
-
Verify installation:
lsmod | grep vboxguest
-
To troubleshoot issues:
nano /var/log/VBoxGuestAdditions.log
- In VirtualBox, go to View > Auto-resize Guest Display.
- Select Full Screen mode.
For advanced users, here’s a single command to automate the setup:
sudo passwd root && chmod 755 ./VBoxLinuxAdditions.run && sh VBoxLinuxAdditions.run && sudo apt install build-essential linux-headers-$(uname -r) && apt install gcc make perl -y && apt install -y virtualbox virtualbox-dkms virtualbox-ext-pack virtualbox-guest-utils virtualbox-qt virtualbox-guest-additions-iso && /sbin/rcvboxadd quicksetup all && init 6
To keep your system updated, create an automated script:
-
Create a file named
update.sh
:nano update.sh
-
Add the following content:
#!/bin/bash sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y full-upgrade && sudo apt-get -y dist-upgrade && sudo apt autoremove -y echo "All done!"
-
Save and close the file (
Ctrl + X
, thenY
, andEnter
). -
Make the script executable:
chmod +x update.sh
-
Run the script:
./update.sh