[Solved] Using wget to download the newest version of Virtualbox

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Sugarcrisp
Level 2
Level 2
Posts: 93
Joined: Sat Mar 31, 2018 6:58 am

[Solved] Using wget to download the newest version of Virtualbox

Post by Sugarcrisp » Mon Aug 19, 2019 7:22 am

I'm in the process of creating a script to download and install all my currently installed software in the event of failure or new system install. I'm fairly new to scripting, but it's coming along. I'm currently using wget to download the newest Google Chrome. It seems to be very straight forward (maybe Virtualbox is too). What I use for Google Chrome is the following.

Code: Select all

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
On the Virtualbox website, there are many choices based on operating system and version. Is there any way to use wget to download the newest and correct version without having to update the script when new versions come out?
Last edited by Sugarcrisp on Sun Aug 25, 2019 3:06 am, edited 1 time in total.

User avatar
catweazel
Level 19
Level 19
Posts: 9184
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Using wget to download the newest version of Virtualbox

Post by catweazel » Mon Aug 19, 2019 8:05 am

Sugarcrisp wrote:
Mon Aug 19, 2019 7:22 am
I'm in the process of creating a script to download and install all my currently installed software in the event of failure or new system install. I'm fairly new to scripting, but it's coming along. I'm currently using wget to download the newest Google Chrome. It seems to be very straight forward (maybe Virtualbox is too). What I use for Google Chrome is the following.

Code: Select all

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
On the Virtualbox website, there are many choices based on operating system and version. Is there any way to use wget to download the newest and correct version without having to update the script when new versions come out?
Your script can simply edit /etc/apt/sources.list and append deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bionic contrib, assuming a 64bit OS, followed by an apt update. Your script would then use wget to grab the repo's key, followed by apt install virtualbox-6.0

Code: Select all

wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add -
Note the space-hyphen at the end.

Finally, you would have to install the vbox-ext pack, which isn't provided in the repos at the moment so you will need to grab it from here: https://www.virtualbox.org/wiki/Downloads, so you could scrape that location in your script for the correct version number of the ext-pack.

Also, have you taken a look at Aptik? It probably already does everything you need.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

Sugarcrisp
Level 2
Level 2
Posts: 93
Joined: Sat Mar 31, 2018 6:58 am

Re: Using wget to download the newest version of Virtualbox

Post by Sugarcrisp » Mon Aug 19, 2019 8:44 am

Hey catweazel,

Thank you for the quick followup. I've looked at the sources.list, but it is empty. I have a sources.list.d that has multiple install files. Not sure how to use them as per your previous post.

I have Aptik and Aptik-gtk installed. I've used it in the past to make a backup. It looks like the gtk software wants you to update to their paid version. Doesn't seem to be working without the update. I believe the aptik cmd line is working, but it will take some figuring to make it work. I copied my backup file to a virtual machine to test it. After running the list from the terminal, all programs failed to install for "not found" and it opens up a file "install /sh"

Not sure how to proceed.

Post Reply

Return to “Newbie Questions”