How To Install Debian 12 on VirtualBox

Experiencing different operating systems can be difficult if we exclude virtualization from the box because removing the current operating system is the only way left to install the new one. You can create a virtual machine to install and use multiple operating systems using a single host system. Furthermore, VirtualBox is one of the popular tools that is used for creating virtual machines. It is compatible with MacOS, Windows, and most Linux distributions including Debian 12. This guide will explain the process for installing Debian 12 on VirtualBox.

How To Install Debian 12 on VirtualBox

Creating a virtual machine comes with several benefits some of them include isolation, efficiency, resource sharing, and versatility. Creating a virtual machine for Debian 12 using VirtualBox is a long process but is quite easy. First, you need to download its ISO file from its official website and then follow the below steps:

Step 1: Create a Debian 12 Virtual Machine

The first step towards Debian 12 installation is to create a new machine on the VirtualBox and for that start by clicking on the New option:

Creating Virtual Machine

Now enter the virtual machine name, then set the location of the folder, and afterward select the type and version of the Linux operating system. Here you can link the ISO file path as well but you can do it later as well:

Creating Debian 12 Virtual Machine on VirtualBox

Next, allocate the resources for the Debian 12 virtual machine, the resources include system RAM and the number of CPUs so allocate wisely and afterward click on Next:

Now set the storage space for the virtual machine, on average 20 GB is fine but if you are planning to install multiple applications that require a higher amount of space then adjust accordingly:

Now at the end verify the details you have entered while creating a Debian 12 virtual machine, if you need to make any changes then you can head back by clicking on the Back option:

Step 2: Install Debian 12 on VirtualBox

Once the virtual machine is created now click on the Start option to launch it:

Now if you haven’t linked the Debian 12 ISO file then add its path here and to proceed further click on Mount and Retry Boot:

Now the installation will begin, here a window will appear displaying multiple options for Debian 12 installation so here select Graphical install:

Installing Debian 12 on Virtual Box

Next, select the language that will be used only for the installation process, once done with the selection click on Continue:

Choosing language for Debian 12 installer setup on WMware.

Now set your location as the time zone for the Debian 12 will be set according to the given location:

Selecting the location for Debian 12 which will be used for settings the timezone.

Based on the selected language the configuration of keyboard keys varies so select the layout for the keyboard:

setting the Debian 12 keyboard layout based on your language.

Now enter your system name or hostname which will be primarily used for network connection:

Setting the Debian 12 Hostname for configuring network on VirtualBox

Now set the domain name if you are planning to use Debian 12 for work purposes or you can leave the blank and click on Continue:

Entering the domain name for installing Debian 12 on Virtualbox.

The installation software will now ask for any additional installation files for Debian 12 other than the ISO file that we previously included. So if there isn’t any select No and Continue:

scanning for any extra media for installing Debian 12 on VirtualBox

The packages or applications on Debian 12 are installed using the mirror lists which are servers from different countries so here select the country that is either your current location or is near your region:

setting the location of mirror list server for Debian 12 package manager while installing it on VirtualBox

After the server location select the Debian archive mirror if you don’t have any preference then just go with the default one at the top:

Selecting Debian archive mirror while installing Debian 12 on Virtual box

If you plan to access any website that might not be accessible without a proxy then add the HTTP proxy information otherwise you can leave it blank:

Adding proxy information for configuring the package manger while installing Debian 12 on VirtualBox.

Now the process for installation will start, be patient it might take up to 30 minutes:

Installing Debian 12 on VirtualBox

Once Debian 12 is installed the system will ask about adding an administrator user along with its password:

Setting up the root password for Debian 12 while installing it on VirtualBox

After you have created an admin account for Debian 12 then it will ask to create another user who do not have the admin rights:

Entering the full name of user for creating a new user account for Debian 12 while installing it on VirtualBox

Now set the username for the account:

Setting the username for new Debian 12 user account while installing it on VuirtualBox

Next, set the password for the normal or non-administrative user of Debian 12:

Setting password for Debian 12 user while installing it on VirtualBox

You can skip this step for creating a non-sudo user if you are going to use Debian 12 for yourself. Next, select the time zone based on the states of the country you selected:

Setting clock time zone for installing Debian 12 on VirtualBox

Now configure the partitions for the drive of the storage we allocated in the initial steps, here you can manually create the partitions for the allocated space or you can use the entire disk:

Selecting the disk partition method for Debian 12 while installing it on virtualbox

Now prompt the formatting of the whole disk:

Selecting the partition disk for Debian 12 while installing it on virtualbox.

By default, the Debian 12 system will keep all files in one drive but you can segregate different directories in different partitions:

Selecting the partition disk scheme for Debian 12 while installing it on virtualbox

Now review the changes in the disks if you want to make further changes then simply go for undo changes to partitions otherwise go for Finish Partitioning and write changes to disk:

Finish partitioning and writing changes to disk while installing Debian 12 on Virtualbox.

Now allow the erasing of all the partitions created by the system:

Formatting Debian 12 partition disks while installing it on virtualbox.

Next, the system will ask about sending the system statistics to the Debian 12 community if you allow it, so choose appropriately:

participating in a popularity-content based on package usage survey on Debian 12 while installing it on Virtualbox.

In the past, Linux systems were only limited to the command line interface but now various desktop environments provide the GUI interface for Linux. Now choose the desktop environment for Debian 12, here I have selected the GNOME environment as it is more compatible:

Selecting the Desktop environment and other software tools on Debian 12 while installing it on VirtualBox

The GRUB (Grand Unified Bootloader) is a crucial component in the boot process of Linux-based operating systems, so prompt the installation for it:

installing GRUB bootloader for Debian 12 while installing it on Virtualbox.

Now set the drive the for GRUB boot loader you can select the drive manually in case if you have done partitions otherwise select the second option:

Selecting disk for installing GRUB boot loader for Debian 12 while installing it on virtualbox.

Now reboot the system to apply the changes:

Rebooting the Debian 12 once the installation is completed on VirtualBox.

Upon the reboot select the user account and enter the password to log in to the Debian 12 :

Login to Debian 12 on Virtual Box

Step 3: Installing Guest Additions on Debian 12

The installation of guest additions allows the sharing of data from the host system to the virtual machine, so for that first click on Insert Guest Additions CD image under the Devices option:

Installing Guest Additions on VirtualBox

Now open the file manager click on the disc image on the left and copy its contents to a different folder:

Next make the guest additions run file executable by using the chmod command:

chmod u+x VBoxLinuxAdditions.run

Next, set the permissions for the run file by making it accessible for all Debian 12 users:

chmod 777 ./VBoxLinuxAdditions.run

Since I have created a non-sudo account so to execute this file I have to add this user in the sudoers file and for that login to the root user:

su root

Next, add the username along with the below line code in the sudoers file or read my detailed guide on How to add users in the Sudoers file in Debian 12:

<user_name> ALL=(ALL:ALL) ALL

After that set the Drag and Drop option to Bidirectional so that files and either be moved from the host system to the Debian 12 virtual machine:

Drag & Drop Feature of VirtualBox

Now change the Shared Clipboard option to Bidirectional so that data can be copied from the host system to the Debian 12 virtual machine:

After changing the data sharing options run the guest additions file:

sudo ./VBoxLinuxAdditions.run

Next to apply the changes reboot the system:

sudo reboot

Now login to Debian 12 and verify if these features are working:

The installation for Debian 12 on VirtualBox is completed.

Conclusion

To install Debian 12 on VirtualBox first create its virtual machine, then load its ISO file and the process for installation will begin. After the installation activate the drag & drop along with the shared clipboard feature by inserting the guest additions file.

 

Index
Scroll to Top