Install VirtulBox GuestAddition through command line in CentOS

  1. Install VM VirtualBox Extension Pack from https://www.virtualbox.org/wiki/Downloads. (make sure to select the extension pack having the version number that matches your VirtualBox version number)
  2. Run the following command in your CentOS console
    wget http://download.virtualbox.org/virtualbox/[version number]/VBoxGuestAdditions_[version number].iso
    sudo mkdir /media/VBoxGuestAdditions
    sudo mount -o loop,ro VBoxGuestAdditions_[version number].iso /media/VBoxGuestAdditions
    sudo /media/VBoxGuestAdditions/VBoxLinuxAdditions.run
    rm VBoxGuestAdditions_[version number].iso
    sudo umount /media/VBoxGuestAdditions
    sudo rmdir /media/VBoxGuestAdditions

    You can find the supported version number at http://download.virtualbox.org/virtualbox/

Advertisements