How To Install Debian on VirtualBox Effortlessly in 12 Simple Steps

Written by

Reviewed by

Last updated: July 24, 2024

Expert verified

SVG Image

TL;DR

Here’s the step-by-step guide to install Debian on VirtualBox and how to manage it like a pro:

  1. Go to the Debian website and download Debian 11.
  2. Open VirtualBox and click New to create a new virtual machine.
  3. Name the VM, select the Debian ISO file, and click Next.
  4. Enter your username, password, hostname, and domain name, then click Next.
  5. Allocate 2 GB of memory and 1-2 CPU processors, then click Next.
  6. Create a virtual hard disk, set it to 20 GB, and click Next.
  7. Review and confirm the settings, then click Finish.
  8. Power up the VM and follow the installation prompts.
  9. Log in with your username and password.
  10. Debian 11 with GNOME is now ready to use on VirtualBox.

Learn more on how to easily install and manage Debian on VirtualBox with the additional tips and tricks provided in the article below.

Curious about exploring Debian but unsure where to begin? Installing Debian on VirtualBox provides an easy way to experience this robust Linux operating system without modifying your existing setup. In this post, I’ll walk you through the step-by-step process of setting up Debian on VirtualBox and offer tips to manage it effectively. By the end, you’ll have a fully functional Debian virtual machine and the skills to keep it running smoothly. This guide will make your journey into Debian straightforward and hassle-free.

What is Debian?

Debian is a popular Linux-based operating system. It’s free and open-source, meaning anyone can use, modify, and distribute it. People around the world work together to develop and maintain Debian, making it a reliable and secure choice. Debian forms the base for many other Linux distributions, including Ubuntu.

Key Features and Benefits of Debian

  • Comprehensive Documentation: Detailed guides and manuals for all tasks.
  • Stability: Thoroughly tested, reliable, widely used in servers.
  • Security: Regular updates, strong security tools.
  • Package Management: Easy software management with APT, over 50,000 packages.
  • Community Support: Large, active community; extensive help available.
  • Flexibility: Works on various hardware, customizable for different uses.
  • Free and Open-Source: No cost, modifiable, shareable.

How to Install Debian on VirtualBox in 12 Steps

To install Debian on VirtualBox, first download Debian 11 from the official Debian website. Open VirtualBox and click New to create a new virtual machine. Name the VM, select the downloaded Debian ISO file, and proceed.

Enter your username, password, hostname, and domain name, then allocate 2 GB of memory and 1-2 CPU processors. Create a virtual hard disk of 20 GB, review the settings, and finish the setup. Power up the VM, follow the installation prompts, and log in with your credentials. Debian 11 is now ready to use on VirtualBox.

Here is the detailed step-by-step guide to install Debian on VirtualBox:

Prerequisites to Install Debian on VirtualBox

Before you start, ensure you have the following:

1. Install VirtualBox by running the downloaded file and following the prompts

    2. System Requirements:

    • Operating System: Windows, macOS, Linux, or Solaris
    • Processor: Recent Intel or AMD processor
    • Memory (RAM): At least 4 GB (8 GB or more recommended)
    • Storage: At least 20 GB of free disk space
      1. Head to the official site of Debian and click Download.
      official site to install debian on virtualbox
      1. Click the link to download the latest version of Debian, which in our case, is Debian 11.
      download the latest version of debian
      1. Once the Debian ISO file is downloaded, open VirtualBox and click on the New button to create a new virtual machine.
      create a new virtual machine install debian on virtualbox
      1. Give it a name, select the Debian ISO file, and click Next to proceed.
      select the debian iso file
      1. Write your username, password, hostname, and domain name. Then, click Next.
      write your username password hostname and domain name
      1. Allocate around 2 GB base memory and 1 or 2 CPU processors for the Debian virtual machine. Then, click Next to proceed further.
      debian virtual machine
      1. Select create a Virtual Hard Disk Now, choose the size of the disk of 20 GB, and click Next.
      create a virtual hard disk now
      1. Review the summary for the Debian installation on your VirtualBox. At this point, you can go back and make changes if required. Once satisfied, click Finish to install Debian on VirtualBox.
      review the summary for the debian installation
      1. Wait for the VirtualBox to power up the Debian VM.
      power up the debian vm
      1. After powering up, it’ll automatically begin the installation and configuration process.
      begin the installation and configuration process
      1. Once the installation is complete, click on the username and enter the password that you had set during the installation process.
      click on the username and enter the password
      1. And that’s it! Now, you can use Debian 11 with GNOME on your VirtualBox.
      debian 11 with gnome on virtualbox

      8 Tips and Tricks to Manage Debian on VirtualBox

      Once you’ve installed Debian on VirtualBox, you’ll need some tips and tricks to help you manage it. So, here are eight quick tips and tricks to manage your Debian OS on your VirtualBox:

      1. Set the Display Resolution

      To adjust the display resolution of your Debian virtual machine, go to the Display settings in the VirtualBox interface. Navigate to File > Preferences > Display settings and choose a suitable resolution for your screen size.

      set the display resolution on debian

      2. Install Additional Software

      Use the terminal to install additional software by typing sudo apt-get install package-name. Use the sudo command to run the installation command as the superuser, allowing you to install software with administrative privileges. For example, to install the gcc compiler, type sudo apt-get install gcc in the terminal.

      install additional software on debian

      3. Improve Performance

      To optimize the performance of your virtual machine, adjust the memory, CPU cores, and disk space allocation in the System settings of the VirtualBox interface. Double-click the System settings and allocate at least 2 GB of memory and 2 CPU cores for optimal performance. However, you can increase these values based on your system’s resources and software requirements.

      optimise the performance of debian

      4. Snapshots

      Use the Snapshots feature in the VirtualBox interface to save the state of your virtual machine at any time. To create a snapshot, go to the Snapshots at the top in the VirtualBox window and click the Take option. Give the snapshot a descriptive name and description to identify it later.

      snapshots feature in the virtualbox

      5. Updating and Upgrading Debian Packages

      Keep your Debian virtual machine up-to-date for security and stability by running sudo apt update and sudo apt upgrade in the Terminal to update the package list and install the latest versions of packages.

      sudo apt update and sudo apt upgrade

      6. Search for Specific Debian Packages

      Use the apt-cache search command in the Terminal to search for packages by name or browse the Debian Package Tracker website for more detailed information on packages, including their dependencies, versions, and bugs.

      search for specific debian packages

      7. Resource Monitoring and Optimization

      To optimize the performance of your Debian virtual machine, monitor system resources in real-time using tools like top, htop, iotop, or glances. Identify bottlenecks and optimize resource usage by disabling unnecessary services, daemons, or startup applications that consume too many resources.

      resource monitoring and optimization

      8. Get Involved with the Debian Community

      Contribute to Debian by reporting bugs, creating packages, or helping with documentation. Communicate with other users and developers, and attend events or conferences to meet other members of the community and learn more about the Debian-based project.

      get involved in community to manage debian on virtualbox

      Final Thoughts On Installing Debian on VirtualBox

      In this guide, I have walked through the step-by-step method to install Debian on VirtualBox, ensuring you have all the prerequisites, system requirements, and necessary software. I have also covered tips and tricks to help you manage Debian on VirtualBox effectively for easier management.

      For more learning, I recommend exploring a few more topics:

      Frequently Asked Questions

      Can I install Debian on VirtualBox on any operating system?

      Yes, you can install Debian on VirtualBox on any operating system that supports VirtualBox. VirtualBox is a virtualization software that allows you to run multiple operating systems on a single host operating system. It means you can install and run Debian as a guest operating system on top of your host operating system, whether it’s Windows, macOS, or even Linux.

      Is it safe to install Debian on a virtual machine?

      Yes, installing Debian on a virtual machine is generally considered safe. Virtualization provides a layer of isolation between the host operating system and the guest operating system, which means that any changes made to the guest operating system (e.g., Debian) are contained within the virtual machine and do not affect the host operating system.

      Why Install Debian on VirtualBox?

      There are several reasons why you might want to install Debian on VirtualBox. Firstly, it provides a stable and secure testing and development environment. Secondly, you can try Debian before committing to a full installation. Thirdly, running Debian on a virtual machine provides an extra layer of security by isolating any changes or installed software from your main operating system. Lastly, VirtualBox allows you to run multiple operating systems on the same machine, which is helpful for switching between different operating systems for work or personal use.

      Can I install other operating systems on the same virtual machine alongside Debian?

      Yes, you can install multiple operating systems on the same virtual machine. This is called multi-booting and is a common use case for virtualization. With VirtualBox, you can create multiple virtual machines, each with a different operating system, and switch between them as needed. However, each virtual machine requires its own set of resources, such as disk space, RAM, and CPU resources, so it’s important to allocate sufficient resources to each virtual machine based on your needs.

      Do I need an internet connection to install Debian on VirtualBox?

      An internet connection is essential for downloading the Debian ISO file and updating packages during the installation process. This is because the installation process involves downloading the latest packages from the Debian repositories, which requires an internet connection. However, once the installation is complete, you can use Debian on VirtualBox without an internet connection.

      How to add a normal user as a superuser in Debian 11?

      To add a normal user as a superuser in Debian 11, add the user to the sudo group in the sudoers file by logging in as the root user, checking for the user group in the sudoers file, and adding the normal user to the sudo group using the command sudo usermod -aG sudo yourusername. Restart the Debian OS and verify the changes using sudo su followed by your normal user password in a new Terminal.

      Ojash

      Author

      Ojash is a skilled Linux expert and tech writer with over a decade of experience. He has extensive knowledge of Linux's file system, command-line interface, and software installations. Ojash is also an expert in shell scripting and automation, with experience in Bash, Python, and Perl. He has published numerous articles on Linux in various online publications, making him a valuable resource for both seasoned Linux users and beginners. Ojash is also an active member of the Linux community and participates in Linux forums.

      Akshat

      Reviewer

      Akshat is a software engineer, product designer and the co-founder of Scrutify. He's an experienced Linux professional and the senior editor of this blog. He is also an open-source contributor to many projects on Github and has written several technical guides on Linux. Apart from that, he’s also actively sharing his ideas and tutorials on Medium and Attirer. As the editor of this blog, Akshat brings his wealth of knowledge and experience to provide readers with valuable insights and advice on a wide range of Linux-related topics.

      Share this article
      Shareable URL
      Prev Post

      Best 5 Ways to Fix “ifconfig: command not found” Error on Debian

      Next Post

      Best 5 Ways to Fix the “You Have Held Broken Packages” Error on Linux

      Read next