Created
March 30, 2023 11:24
-
-
Save angstyloop/bac6b8d8ad2bd210ce68304d4fdedd29 to your computer and use it in GitHub Desktop.
Install VirtualBox Version 7.0 on Debian-based Linux
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
#!/bin/bash | |
# install_virtualbox_on_debian_based_linux.sh | |
# Install VirtualBox Version 7.0 on Debian-based Linux | |
# Add a line for the oracle virtualbox debian package to /etc/apt/sources.list | |
# (you can use echo/append). Replace "jammy" with your distribution name. | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list | |
# Download and register the GPG armorfile containing the public key. Extract | |
# the public key from the armorfile to the OS keyring. | |
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc|sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor | |
# Check if the fingerprint of the key matches what's listed on virtualbox | |
# website. If it doesn't match print something and exit. | |
if ! gpg --show-keys /usr/share/keyrings/oracle-virtualbox-2016.gpg|grep -q B9F8D658297AF3EFC18D5CDFA2F683C52980AECF; then | |
echo Public key /usr/share/keyrings/oracle-virtualbox-2016.gpg does not have the correct fingerprint. | |
exit 1 | |
fi | |
sudo apt-get update | |
sudo apt-get install -y virtualbox-7.0 | |
# References | |
# https://www.virtualbox.org/wiki/Linux_Downloads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment