In this tutorial, we learn how to install Debian 11 on VirtualBox. VirtualBox is open-source cross-platform virtualization software that allows running multiple guest operating systems.
Debian 11 comes with multiple Desktop environments such as Gnome, KDE, LXDE, LXQT, Mate, Xfce, and Cinnamon.
Let's install Debian 11 on VirtualBox with Gnome Desktop Environment.
- VirtualBox installed on your computer
- Minimum 1GB RAM (Recommended 2GB)
- Minimum 10B free disk space (Recommeded 20GB)
- Internet connectivity
- Hardware virtualization enabled
Step 1: Download Debian ISO
First, download Debian 11 ISO image from the official website. You can either download the minimal CD (called netinst) which is a smaller size iso, fetch remaining packages over the internet, or full DVD/CD image with all the packages. Debian supports both 64 bit and 32 bit computers.
Step 2: Create a VirtualBox Guest Virtual Machine
Assuming you've downloaded a Debian 11 iso and have VirtualBox installed.
Open the VirtualBox and on the VirtualBox Manager click New.
Set a name for your guest virtual machine, type - should be 'Linux' as Debian is a Linux distribution, and version - from the drop-down menu choose respective Debian version.
Set required RAM to be allocated for the guest virtual machine in megabytes:
Create a Virtual Hard disk:
Select the virtual disk type. VDI is the default disk format for the open-source Oracle VM VirtualBox. The other two, VHD ( developed by Microsoft) and VMDK (VMWare’s Virtual Disk File Format) also support Linux.
Here I choose VDI disk file type.
Set Virtual hard disk allocation type, choose if you want hard disk file to grow automatically as its fills up or a fixed size.
Here I choose the Dynamically allocated option.
Choose the file location and maximum size for the hard disk file to store the data.
Step 3: Attach Debian ISO Image to IDE
Here we attach the ISO image which we downloaded in step 1. You can attach ISO images in two ways, either Start the newly created VM or go to Settings -> Storage -> Add Disk image to the Optical Drive.
Select your just created VM and click the Start button:
Click on the folder icon highlighted to choose iso image file:
Click Add, it will open a file picker dialog for you to select your downloaded iso:
Your selected file will be added to VirtualBox, select and click Choose:
Step 4: Start the Debian Installation on the VM
After selecting your iso, click Start to start the Debian installation.
From the Debian installer menu choose your mode of installation. Graphical installation might have a slight difference in visual appearance when compared to text mode
The next three pages would be to select your preferred language, location, and keyboard.
Now start the configuration of the network, start with setting a hostname for the system - which is a single word identifier of your system in the network.
Add the domain name to which this host belongs, you can leave it blank if it's not part of any domain or can configure later.
Now set up users and passwords. First create a root password, if left blank - then the root account will be disabled and initially user will be given sudo access. Recommend setting up a root password.
A user account will be created with non-administrative privilege. First, enter the full name of the new user.
Type username for your account:
Enter your new user password and enter the same password to verify:
Now configure the clock to set the desired timezone.
The installer now will guide you through partitioning the disks.
Select the disk to partition:
Here I choose All files in one partition which is recommended for new users.
Here looks at the overview of the configured partitioned.
Choose Yes to write changes to disks.
This starts the base system installation
If you have additional media can add it here or else just skip by selecting the No option.
Next, configure the package manager - First choose the mirror location close to your network.
Select a Debian archive mirror from the list.
Add HTTP proxy server information, if required to access the internet or else leave it blank.
Participate in the package usage survey or else choose No option.
You can now select a predefined collection of software such as Desktop environment, web server, SSH server. We keep continuing with the default settings ie with GNOME desktop.
This will retrieve files from the mirror repo and take some time to complete the installation.
Choose Yes to install the GRUB bootloader on your primary drive.
Choose the device for boot loader installation.
Finally, the installation finished screen pop up, and click the Continue button to reboot.
Debian 11 Login screen - click on the user account and then give the password
Enjoy using Debian 11 with GNOME on your VirtualBox.
You can install VirtualBox guest additions to improve guest OS performance.
In this tutorial, we learned how to install Debian 11 on VirtualBox. Enjoy using Debian on your Virtual machine for your test and development.