#!/bin/bash #Colors RED="\e[1;31m" GREEN="\e[1;32m" YELLOW="\e[1;33m" BLUE="\e[1;34m" DEFAULT="\e[0m" # Check if the script is run with root privileges if [ "$EUID" -ne 0 ]; then echo "Please run this script as root or using sudo." exit 1 fi echo -e "${YELLOW}Do you want to Update the system?: [Y/n]${DEFAULT}" read -r confirmation if [[ ! "$confirmation" =~ ^[Nn]|[Nn][Oo]$ ]]; then echo "Updating..." sudo apt-get update -y sudo apt-get upgrade -y else echo "You choose no" fi echo -e "${YELLOW}Do you want to Install VirtualBox-7.2?: [Y/n]${DEFAULT}" read -r confirmation if [[ ! "$confirmation" =~ ^[Nn]|[Nn][Oo]$ ]]; then echo "Installing..." if [ $(dpkg -l | grep -c "virtualbox" ) -eq 0 ]; then sudo apt-get install -y \ ca-certificates \ wget \ gnupg \ lsb-release \ echo -e "${BLUE}Adding Docker's official GPG key${DEFAULT}" wget -qO - https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/oracle-virtualbox-2016.gpg - echo -e "${BLUE}Add the repository to Apt sources${DEFAULT}" sudo tee /etc/apt/sources.list.d/virtualbox.sources <