Last active
August 2, 2016 16:46
-
-
Save dceoy/6101381 to your computer and use it in GitHub Desktop.
[RHEL] Install virtualbox guest additions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ -f "/etc/lsb-release" ]]; then | |
apt-get --version | |
sudo apt-get -y update | |
sudo apt-get -y install gcc make | |
elif [[ -f "/etc/redhat-release" ]]; then | |
if `dnf --version`; then | |
sudo dnf -y update | |
sudo dnf -y install gcc make | |
elif `yum --version`; then | |
sudo yum -y update | |
sudo yum -y install gcc make | |
fi | |
fi | |
vbga_ver="$(curl http://download.virtualbox.org/virtualbox/LATEST.TXT)" | |
curl http://download.virtualbox.org/virtualbox/${vbga_ver}/VBoxGuestAdditions_${vbga_ver}.iso -o /tmp/vbga.iso | |
sudo mount -t iso9660 /tmp/vbga.iso /mnt/ | |
sudo /mnt/VBoxLinuxAdditions.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Virtualbox -> Devices -> Install Guest Additions... | |
mount /dev/cdrom /mnt | |
/mnt/VBoxLinuxAdditions.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment