How to Install Oracle VM VirtualBox on Ubuntu 23.10

Do you want to use different computer systems on just one computer without turning it off or changing between them? Oracle VM VirtualBox 6 & 7 versions can do that for you.

We’ll explain how to install and use Oracle VM VirtualBox 7 on Ubuntu 23.10, a popular type of Linux software. We’ll also teach you how to make new virtual machines and tell you about the latest things you can do with this software. Ready to begin?

Installing VirtualBox in Ubuntu

Credit: Ubuntu

Expand Your Computer: Do More with VirtualBox and Ubuntu

VirtualBox is a handy tool that lets you run different operating systems on your PC without actually changing anything. You can make and control lots of virtual computers with it, all on top of the one you already have. That means you can try out stuff like Mac OS X, Microsoft Windows, Oracle Linux, Solaris, other types of Linux, and even old systems without needing to restart your PC.

No doubt, lots of people around the world use Ubuntu, a type of computer system called Linux. This is because many people help each other out on forums. If you add VirtualBox to your Ubuntu, you can use all the cool things and also try out different systems. You can test out some new software or see how another system works. With Oracle’s software, you can do all that quickly and safely.

What’s New in Oracle VM VirtualBox 6?

Here are the things Oracle Cloud Infrastructure can do:

  • It helps you bring stuff in (Import Appliance support)
  • Enables you to take things out (Export Appliance support)
  • It lets you make virtual machines inside other virtual machines (Nested Virtualization support)
  • Makes graphics better (Improved 3D support)
  • It makes editing more accessible and improves how the mouse pointer works (Embedded editors and mouse pointer enhancements)
  • It helps you organize your virtual machines better and lets you tweak storage settings (Virtual Machine Groups and advanced storage settings)
  • Works well with Linux Kernel 5.4
  • Supports EFI for virtual machines
  • Uses hardware to make virtualization faster (Hardware-based virtualization core)

After you put VirtualBox on a standard Linux system like Ubuntu, you can start up lots of different old or new systems really fast.

Once you’ve got a new system set up with Oracle VM, you need to add Guest Additions. That way, your computer’s parts work better with the new system. It makes sharing files between your computer and the virtual one much more accessible. Plus, it helps make the virtual screen look more likable.

Also, if you want to use USB 3.0 stuff and other hardware, you’ll need to get the Extension Pack after you install.

How to Install and Configure VirtualBox 6 & 7 in Ubuntu

You can install and use VirtualBox to make pretend computers in Ubuntu 23.10. You can set it up in two ways: by watching this video or by following written instructions.

  1. To get the newest Oracle virtualization for your Linux PC, go to virtualbox.org and click “Download” on the main page.
  2. Go to the “Platform Packages” page, choose “Linux Distributions,” and select “Ubuntu 22.04 or newer” from the list of options.
  3. Once you click on “Ubuntu 22.04,” the download will begin right away. Hit the “Save” button to keep the program on your computer and wait for it to finish downloading.
  4. After you download the file with the “.deb” extension, you’ll find it in your Downloads folder. Next, open the terminal on your desktop and navigate to the Downloads folder. To install the setup file with the “.deb” extension, type the command below.
    sudo dpkg -i virtualbox-6.1_6.1.34-150636.1~Ubuntu~eoan_amd64.deb
  5. After you use the dpkg command, type sudo apt install -f and hit Enter. This will install any additional packages needed. If it asks you to confirm the installation, press Enter again.
    sudo apt install -f
  6. Now, VirtualBox should work well. But sometimes, specific Linux systems might have problems with a kernel module. If that happens, you might see an error message about the “vboxdrv” kernel module in the terminal.
    WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (5.15.0-27-generic), or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig
    
    You will not be able to start VMs until this problem is fixed.
  7. To fix the vboxdrv kernel module error, you need to get and install a specific package. It’s called linux-libc-dev_5.8.0-25.26_amd64.deb. Just type this command in the terminal to download and install it.
    wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.15.0-27.28_amd64.deb
    sudo dpkg -i linux-libc-dev_5.15.0-27.28_amd64.deb
  8. If you see an error telling you to restart VirtualBox because you need to install the Linux kernel-headers packages, don’t worry. Just type this command in the terminal to install the package. After that, run the command “vboxconfig” and wait for the kernel modules to recompile.
    sudo apt install linux-headers-$(uname -r) build-essential dkms
    sudo /sbin/vboxconfig
  9. Once the kernel modules have finished recompiling, you should be able to install Oracle VM VirtualBox on your Ubuntu without any issues.
  10. Once you finish installing it, head back to the VirtualBox website. This time, download the Extension Pack. Just click on “All supported platforms” on the Downloads page, and the file will download straight to your computer.
  11. To install the Extension Pack, double-click the file you downloaded. Then, agree to the license terms, click “Install,” and finish the installation process.

How to Create a New Virtual Machine with Oracle VM in Ubuntu

  1. To make a new virtual machine in Ubuntu, click on “Machine / New.” This lets you set up a brand-new virtual PC that you can customize however you want. After creating it, you can install the operating system and programs you want.
  2. When the “Create Virtual Machine” window pops up, choose the type and version of the operating system you want.
  3. If you’re going to run Windows 10 on Ubuntu, pick it from the list and set up the kernel version. Then, adjust the RAM according to how well your computer works.
  4. Make a new virtual disk and pick VDI as the file type. The VirtualBox team suggests using VDI for your virtual disk file.
  5. After that, decide if you want the virtual disk to have a fixed size or if it should grow as needed. Choose the option that fits best with how you plan to use the virtual machine.
  6. In the file location window, pick where you want to store the VM files and how much space they should take up. If you’re only going to use the VM once and then delete it, you can set the HDD value to the smallest amount.
  7. Once you’ve selected the size and location of the virtual disk, click the “Create” button and then open the settings for the VM.
  8. In the virtual machine settings, turn on the options for Shared Clipboard and Drag and Drop. Enable 3D acceleration, USB 3.0 device support, and file sharing between the host and guest. Additionally, take out the floppy device from the boot order and put the HDD in the first position.
  9. To set the ISO file for Windows 10 or another version into the virtual machine, click on the empty device in the Storage section. Then, click on the CD/DVD icon and select “Choose/Create a Virtual Optical Disk.” In the window that appears, find where the ISO file is saved on your computer and add it to the virtual machine.
  10. By choosing the ISO image and starting the virtual PC, you’re beginning to create a new and exciting OS.

How to Uninstall VirtualBox from the Ubuntu PC

You might have to remove VirtualBox, the program you run on your Ubuntu PC, to make virtual machines if you want to use a different program.

Getting rid of a program on Windows is more straightforward, and you usually have to delete extra stuff from the Program Files.

But removing a program in Ubuntu is easy. After you uninstall it, its files might be scattered in various spots.

Using a terminal to remove Oracle VM virtualization software is helpful.

You can either overlook this video or follow these steps to delete VirtualBox from Ubuntu.

  1. First, if you made a shortcut on the Ubuntu desktop, delete it by hand. Otherwise, you’ll see an error about that shortcut spot when you uninstall.
  2. After you remove the VirtualBox shortcut on your desktop, open the terminal. Then, type in the command below. You’ll need to confirm which packages you want to uninstall. Stuff like Extension Pack or DKMS will be removed at this point.
    sudo apt remove --purge *virtualbox*
  3. Now, you need to get rid of any leftover files from the uninstall. Start by deleting the “VMs” folder where you made your virtual machines.
    sudo rm -rf ~/"VirtualBox VMs"
  4. Next, delete the configuration file that stores all the settings you changed in Oracle software. Also, remove the VBox folder from/usr/lib.
    sudo rm -rf ~/.config/VirtualBox/
    sudo rm -rf /usr/lib/"VirtualBox"
  5. Last, you need to delete the user group that VirtualBox created when you installed it. First, see what groups are there using the compgen command. Then, use the groupdel command to get rid of the vboxusers group.
    compgen -g | grep -i "vbox"
    sudo groupdel vboxusers

Conclusion

In simple terms, the Oracle VM software is an excellent tool. It lets you run different operating systems on your computer without making any significant changes. The newest version of it comes with lots of cool new stuff to help you create and control your virtual machines faster and easier.

This guide tells you step-by-step instructions on how to install VirtualBox on Ubuntu. Whether you want to test out new software or check out different systems, using it is a safe and intelligent way to do it. So, why not give it a shot today and see all the cool things you can do with it?

Copyright © 2018 - 2024