top of page

Virtual Box: Install & How to Commands

Updated: Mar 16, 2024

Update the package lists for upgrades and new package installations:

sudo apt update

Install necessary dependencies:

sudo apt install -y build-essential linux-headers-$(uname -r)

Download the VirtualBox repository key:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

Add the VirtualBox repository to your system's software repository list:

echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Update the package lists again:

sudo apt update

Install VirtualBox:

sudo apt install -y virtualbox-6.1

Note: The above command installs VirtualBox version 6.1. You can adjust the version number if a newer version is available.


Add your user to the vboxusers group:

sudo usermod -aG vboxusers $USER

Reboot your system:

sudo reboot

-----------------------------------------------


#Resize VBox Hard Drive

VBoxManage modifyhd MyLinux.vdi --resize 100000 (100 GB)

# List virtual machines

VBoxManage list vms
"MyVM" {e4b0c92c-4301-4a7d-8af8-fe02fed00451} 

# Start VM in headless mode

VBoxManage startvm MyVM --type headless 

# Power off VM

VBoxManage controlvm MyVM poweroff

# Show running VM

VBoxManage list runningvms

# Show VM Properties

VBoxManage guestproperty enumerate <vmname>

Reference:

Recent Posts

See All
How to Samba on Ubuntu Server

Install sudo apt install samba -y Verfiy Installation systemctl status smbd Configure sudo nano /etc/samba/smb.conf Create symbolic to...

 
 
 

Comments


Contact Me

Tel: 678-642-8051

cspeed@jcsassoc.com

  • Google+ Long Shadow
  • LinkedIn Long Shadow
  • Facebook Social Icon
  • Twitter Long Shadow

© 2005 by Christopher Speed

Your details were sent successfully!

bottom of page