Ubuntu Desktop - VM

Ubuntu


VirtualBox VM

Download and Install VirtualBox

Use the latest VirtualBox version (Screenshots may not be updated)

VirtualBox is a virtualization open source software that runs on Linux, Windows and Mac OS.

  • Download latest VirtualBox and VirtualBox Extension Pack here based on your platform (Windows in this tutorial).

  • Install VirtualBox with default settings.

  • Install VirtualBox Extension Pack.


Download Linux Image

For this tutorial Ubuntu Desktop Linux will be used.

If you want to use another distro check the Popular Linux Distributions list.

  • Download the latest Ubuntu Desktop LTS .iso file here.


Create Virtual Machine

  • Run VirtualBox.

  • Click on the New button to create a new virtual machine (VM)

  • Click on Expert Mode

  • Set the VM Name, the machine folder to store the VM, type (Linux) and version (Ubuntu 64bit).

  • Set the Memory size (RAM) at 4096 MB (4GB) or use the default settings 1024 MB

  • Select Create a virtual hard disk now

  • Proceed with the Create button

  • Set the File size (disk size) at 20 GB

  • Set the Hard disk file type as VDI - Dynamically allocated

  • Proceed with the Create button to initialize the machine.

  • Select the new VM in the manager windows and click on the Settings button.

  • Navigate to the Sistem tab and:

    • remove Floppy from boot order

    • set Chipset to PIIX3 (default)

    • Enable PAE/NX in the Processor menu

    • check Acceleration menu to have Default Paravirtualization and Enable Nested Paging checked

  • Navigate to the Display tab and increase the Video Memory to 128 MB

  • Graphics Controller must be VMSVGA to be able to use VirtualBox Guest Additions


Install Linux Image

  • Select the new VM and click on the Start button to start it

  • Click on the file icon to open the Optical disk selector

  • Use the Add button to select the .iso file previously downloaded, select it from the list and Choose it

  • Click on the Start button to start he machine with the mounted ubuntu-22.04-desktop-amd64.iso (in this case)

  • Wait for the Ubuntu boot and installation menu

  • Select your language and click Install Ubuntu

  • Select your Keyboard layout and continue

  • Choose Normal installation and check both Other options boxes (you must be connected to the Internet)

  • Choose Erase disk and install Ubuntu and continue the installation without enabling encryption

    • I suggest using LVM for better dynamic disk management

  • Select your Location and time zone from the map screen

  • Create your login details as hostname, username and password

  • Proceed with the Continue button that will start Ubuntu installation

  • Restart your VM once the installation has completed.


Install VirtualBox Guest Additions

Guest Additions software unlocks some advanced features of VirtualBox to better integrate the VM and the host machine, as well as improved video support using VMSVGA graphics controller.

  • Complete the VM first boot and login to Ubuntu desktop

  • On the VirtualBox menu select Devices - Insert Guest Additions CD image...

  • Run the VBox_GAs disk inside the virtual machine desktop

  • Run the installation when prompted

    • If the prompt do not auto-start, open the disk, right-click on the autorun.sh file and Run as a Program

    • Enter your password to install it

  • Restart the VM

  • Right-click on the disk and Eject it

  • Activate the shared clipboard from the Devices - Shared Clipboard - Bidirectional menu


Update Linux

Keep the Ubuntu O.S. updated using one of the next methods.

  • Update it via the Software Updater app

  • Open a Terminal window (Ctrl+Alt+T) and update the system with the next command.

    • This can be used when connected via SSH too.

πŸ“Œ Refer to the official documentation of the distribution for instructions on installing alternative Linux distributions.


Configurations

Basic config

SSH keys

  • Host SSH keys - resets the host's SSH identity and enables SSH (disable if not necessary)

  • User SSH key pair - creates a new personal SSH login key

  • Add to ssh-agent - loads the key for automatic use

  • Add the Public Key to a system/sudo user on a potential Ubuntu Server VM


  • Config file -> $HOME/.config/terminator/config

    • Make sure to have already installed the necessary font

Zsh & Oh-My-Zsh


Tools

Basic Tools


  • Run it with subl command.








  • Config file -> $HOME/.config/flameshot/flameshot.ini

    • Make sure to have already installed the necessary font

  • Set this as a custom Keyboard shortcut for flameshot

    • I use Shift+Alt+S


  • ctop - concise commandline monitoring for containers


DevOps Tools

  • Open VSCode. From File > Preferences > Settings, search for telemetry, and set the Telemetry: Telemetry Level setting to off.

  • Set Git user name and email address





  • Enable VT-X/AMD-v for the VM.








Last updated

Was this helpful?