WindowsMacSoftwareSettingsSecurityAndroidProductivityLinuxPerformanceAppleDevice Manageme.. All

How to Install Debian on VirtualBox

Edited 1 week ago by ExtremeHow Editorial Team

DebianVirtualBoxInstallationVirtualizationOperating SystemOpen SourceSoftware SetupLinuxDesktopVirtual Machine

How to Install Debian on VirtualBox

This content is available in 7 different language

Debian is a popular and widely used Linux distribution. It is known for its stability and huge repository of packages. VirtualBox is a powerful virtualization tool that allows you to run multiple operating systems on a single physical machine. Installing Debian on VirtualBox is a great way to explore this Linux distribution without affecting your main operating system. In this comprehensive guide, we will walk you through the entire process of installing Debian on VirtualBox step by step.

Step 1: Download and install VirtualBox

Before you can install Debian on VirtualBox, you need to install VirtualBox on your computer. VirtualBox is available for Windows, macOS, and Linux. Follow these steps to download and install VirtualBox:

  1. Go to the official VirtualBox website: https://www.virtualbox.org.
  2. Click the "Download" link.
  3. Choose the appropriate version of VirtualBox for your operating system (Windows, macOS, or Linux).
  4. Follow the on-screen instructions to download and install VirtualBox on your machine.
  5. Once installed, launch VirtualBox to make sure it is working correctly.

Step 2: Download the Debian ISO

To install Debian in VirtualBox, you need to download the Debian ISO file. The ISO file is a disk image that contains everything needed to install Debian. Follow these steps to download the Debian ISO:

  1. Go to the official Debian website: https://www.debian.org.
  2. Click the "Get Debian" link.
  3. Select the "Download installation image" option.
  4. Select the desired Debian version (e.g., latest stable release) and architecture (e.g., 64-bit).
  5. Download the ISO file to your computer.

Step 3: Create a new virtual machine in VirtualBox

Now that you have installed VirtualBox and downloaded the Debian ISO, it's time to create a new virtual machine. Here's how to create it:

  1. Open VirtualBox and click the "New" button in the toolbar to create a new virtual machine.
  2. In the "Name" field, enter a name for your virtual machine (for example, "Debian").
  3. Select "Linux" from the "Type" dropdown menu.
  4. From the "Version" dropdown, select the appropriate option based on the architecture of the ISO you downloaded (for example, "Debian (64-bit)").
  5. Click "Next" to go to the memory size screen.
  6. Allocate RAM to your virtual machine. It is recommended to allocate at least 1 GB (1024 MB) of RAM for Debian, although more is better. Click "Next".

Step 4: Create a virtual hard disk

The next step is to create a virtual hard disk where Debian will be installed. Follow these instructions:

  1. On the "Hard Disk" screen, select "Create a virtual hard disk now" and click "Create."
  2. Select "VDI (VirtualBox Disk Image)" as the hard disk file type and click "Next."
  3. Choose "Dynamically allocated" or "Fixed size" for storage on the physical hard disk. If you are unsure, choose "Dynamically allocated." Click "Next."
  4. Set the size of the virtual hard disk. For a basic Debian installation, 10 GB should be enough, but you can allocate more if necessary. Click "Create" to finish.

Step 5: Configure virtual machine settings

Before starting the virtual machine, it is important to configure some settings to ensure smooth installation and performance:

  1. Select your newly created virtual machine (e.g., “Debian”) from the list in VirtualBox.
  2. Click the "Settings" button in the toolbar.
  3. Under the "System" tab, make sure the "Floppy" option is unchecked in the Boot Order section.
  4. Go to the "Processor" tab and increase the number of processors if your system allows it. At least 2 CPUs are recommended.
  5. For better performance go to the "Display" tab and set "Video Memory" to the maximum value.

Step 6: Mount the Debian ISO

Now you need to mount the downloaded Debian ISO file to the virtual machine so you can begin the installation:

  1. In your virtual machine's "Settings" window, click the "Storage" tab.
  2. In the "Storage Devices" section, click the empty CD/DVD drive icon under "Controller: IDE."
  3. In the "Attributes" section, click the small CD icon next to "Optical Drive" and select "Choose disc file...".
  4. Browse to the location where you downloaded the Debian ISO file and select it. Click "Open."
  5. Click "OK" to close the Settings window.

Step 7: Start the virtual machine and install Debian

After all the settings are set up, it's time to start the virtual machine and install Debian:

  1. Select your virtual machine in VirtualBox and click the "Start" button.
  2. Your virtual machine will boot from the Debian ISO. You should see the Debian installation menu.
  3. Select "Install" or "Graphical Install" to begin the installation process. "Graphical Install" provides a more user-friendly interface.
  4. Follow the on-screen instructions to complete the installation. This usually involves selecting your language, region, and keyboard layout.
  5. When prompted, choose the partition scheme. For beginners, it is recommended to use the default option of "Guided - Use entire disk."
  6. Follow the prompts to set up a user and password. You will need to create a root password and a user account.
  7. The installer will then proceed to install the Debian base system and software packages.
  8. Once the installation is complete, you will be prompted to remove the installation media. In VirtualBox, go to "Devices", then "Optical Drives" and uncheck the Debian ISO.
  9. Reboot the virtual machine to start your new Debian system.

Step 8: Setup after installation

After Debian is installed, there are a few post-installation tasks you'll want to perform to optimize the performance and functionality of your virtual machine:

  1. Login to your new Debian system using the user account you created during installation.
  2. Open a terminal window and update the package repository by running the following command:
    sudo apt update
  3. Upgrade installed packages to their latest version:
    sudo apt upgrade
  4. Install additional software as needed. For example, if you need a desktop environment, you can install GNOME, KDE, or any other software you like:
    sudo apt install gnome
  5. Install VirtualBox Guest Additions for better integration with your host machine. First, install the required packages:
    sudo apt install build-essential dkms linux-headers-$(uname -r)
  6. In VirtualBox, go to the "Devices" menu and select "Insert Guest Edition CD Image".
  7. Mount the CD and run the Guest Edition installer:
    cd /media/cdrom sudo sh ./VBoxLinuxAdditions.run
  8. Reboot your virtual machine to apply the changes.

Conclusion

Installing Debian on VirtualBox is a straightforward process that allows you to experience this powerful Linux distribution without making changes to your main operating system. By following the steps outlined in this guide, you should now have a fully functional Debian virtual machine up and running. Virtual machines are perfect for testing software, learning new operating systems, and developing applications in an isolated environment.

Whether you're a new user of Linux or an experienced user looking to use Debian for the first time, using VirtualBox provides a flexible and convenient way to get to know this famous open-source operating system.

If you find anything wrong with the article content, you can


Comments