top of page
  • Linkedin
  • bluesky
  • Instagram

Ubuntu Server 22.04 on VirtualBox

  • solbergtonje
  • 16 nov. 2024
  • 3 min läsning

Uppdaterat: 25 dec. 2024

If you don't already have VirtualBox installed, you can follow this tutorial. It should be possible to follow even if you have a different operating system than Windows 11.

Ubuntu Server can be downloaded from https://ubuntu.com/download/server


ree



While it is downloading, you can start by creating the virtual machine for the Ubuntu Server. Click on "Machine" and choose "New"


ree



Give a name to the virtual machine and choose where to store it. Under "Type" select "Linux" and under "Version" select "Ubuntu (64-bit)"


ree



Choose memory size, 4GB of RAM is a good choice if you might use the desktop interface and want good performance.


ree



You want a virtual hard disk for storage, so choose "Create a virtual hard disk now"


ree



Choose "VDI (VirtualBox Disk Image)" for use in VirtualBox, read up on the other formats here


ree



Choose "Dynamically allocated"(Fixed size might be the appropriate choice if the virtual server will be introduced in a production environment without access to a storage pool.)


ree



Allocate virtual space for the server accordingly, 30GB is more than enough for now.


ree



Under "Storage" click on the line where it says "[Optical Drive]" and "Choose a disk file"


ree



Choose the Ubuntu Server iso file you downloaded


ree



Let's start up this virtual machine, click on the green arrow at the top where it says "Start"


ree



Navigate with the arrows and choose "*Try or Install Ubuntu Server" then hit ENTER


ree



Select your preferred language, navigate with the arrows, and then hit ENTER


ree



Make changes if you don't use an English keyboard, navigate with the arrows and TAB, then make sure "Done" is green and hit ENTER


ree

ree




Choose the server appropriate for your use, then make sure "Done" is green and hit ENTER


ree



If you don't want to use the network identified, make the changes needed, then make sure "Done" is green and hit ENTER


ree



Configure the proxy here if you want to – this can be skipped! Make sure "Done" is green and hit ENTER


ree



No changes are needed, you can let the system know where to fetch packages from. Make sure "Done" is green and hit ENTER


ree



As a default, the "Use an entire disk" and "Set up this disk as an LVM group" is selected. Make changes as needed or leave it as is. Read up on what LVM group is here. Make sure "Done" is green and hit ENTER


ree



Check that the summary is according to your needs. Then make sure "Done" is green and hit ENTER


ree



Mark "Continue" with red and hit ENTER


ree



Create a user with a password, and give the server a name. Then make sure "Done" is green and hit ENTER


ree



Choose whether or not to install SSH for remote access to the server. Then make sure "Done" is green and hit ENTER


ree



Select packages to install, if any. Then make sure "Done" is green and hit ENTER


ree



When the installation is complete, make sure "Reboot Now" is green and hit ENTER. The machine will reboot and may ask you to remove the installation disk (the iso file) and then hit ENTER again.


ree



When the machine has rebooted, log in with the username and password you created during the installation process. Notice that the password will not be visible.


ree



Let's update the system. Run the command: 'sudo apt update' and write the password


ree



Then install the packages by running the command 'sudo apt upgrade', write 'y' and hit ENTER to continue


ree



Install VirtualBox Guest Additions by running the command 'sudo apt install virtualbox-guest-additions-iso virtualbox-guest-utils virtualbox-dkms'


ree



Write 'y' when asked to continue


ree



You now have an updated version of Ubuntu Server installed with VirtualBox Guest Additions in Oracle VM VirtualBox.


Change password for root

Additionally, you might want to change the password for root. Run the com mand 'sudo -i' and write the user's password. You have now switched from your user to root. Run the command 'passwd' and write the new password twice.


ree


Restart or shutdown

To restart the machine run the command 'reboot' or 'init 6' To shutdown the machine entirely run the command 'init 0'



SOURCES

Canonical Ubuntu Server: https://ubuntu.com/download/server

All images: Solberg, 2022

Contact / Kontaktformulär

© 2024-2025 Tonje Solberg

bottom of page