0

In many linux distributions (at least the ones based on debian), virtualbox can be installed directly in console with or without third-party repository, example:

Ubuntu repo:

apt install virtualbox virtualbox-ext-pack

or vbox repo:

echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | tee /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
apt -y install virtualbox-6.1
export VBOX_VER=`VBoxManage --version|awk -Fr '{print $1}'`
wget -c http://download.virtualbox.org/virtualbox/$VBOX_VER/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack

What is the difference between both installation methods and which is the most recommended?

Very Important:

The question is NOT about why virtualbox doesn't work properly in Ubuntu 20.04, from ubuntu repo (I know it doesn't work as it should. See bug discussion HERE). The question is about the installation methods and the differences between two methods. For example why in some distributions (or versions) it works well with Ubuntu repo and in others virtualbox repo is necessary because Ubuntu repo does not work as it should

acgbox
  • 2,200
  • 1
    The one from virtualbox can have a newer version than the one from Ubuntu. – Rinzwind May 12 '20 at 20:12
  • 2
    Until about four years ago, many folks installed Vbox from the upstream source in order to get specific new features -- one big feature was USB pass-through. Those features filtered naturally into the Ubuntu version long ago. I'm not sure why so many random websites still insist on adding Vbox using the upstream deb source, but I suspect it's inertia from those old days. – user535733 May 12 '20 at 20:21
  • @user535733 thanks. Update the question to change PPA for third-party repository – acgbox May 12 '20 at 20:27
  • 1
    I just installed VB by sudo apt virtualbox with no problems. – Pilot6 May 12 '20 at 20:40
  • 1
    And VB works well for me. – Pilot6 May 12 '20 at 20:48

1 Answers1

2

I don't know about any PPA containing VirtualBox. Neither of ways mentioned in the question get any PPA involved.

You have two options:

  1. Install Virtualbox from Ubuntu repositories.

  2. Download a deb file from https://www.virtualbox.org/.

Currently there is not much difference which one to install, because both ways will install the 6.1.6 version.

It doesn't make sense to add the source manually, because installing deb with dpkg will do it for you.

The difference is from where you will receive updates. In the first case you'll get them from Ubuntu repositories, that may get updates with delays or stop updating at some point.

In the second case, an update source from virtualbox will be set up.

But if you are using an older Ubuntu release, or later with the 20.04 the difference will be with VirtualBox version. Ubuntu maintainers won't switch for a new major version. And if you want the latest VirtualBox release, installing it from a deb will be the only option.

Regarding that virtualbox doesn't have a focal deb and the repo, it should be updated soon. In this case I recommend to install from Ubuntu repos for now. You can switch later, if the repos won't properly get updates.

mook765
  • 15,925
Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • the question was fixed and PPA was changed to third-party repository – acgbox May 12 '20 at 20:29
  • Well, it doesn't really matter how you call it. The real question is where to install from: virtualbox or Ubuntu repos. I think I've explained it. – Pilot6 May 12 '20 at 20:32
  • If so, virtualbox would work fine on ubuntu 20.04 with 'apt' and it doesn't. – acgbox May 12 '20 at 20:35
  • 1
    @OrganicMarble that link is in the question – acgbox May 12 '20 at 20:36
  • @ajcg Can you eloborate "it doesn't work". I will check the apt install on 20.04 now. – Pilot6 May 12 '20 at 20:37
  • Pilot6 It does not work as it should (it does not resize, it does not install ext manager correctly, etc, etc). This is not related to the question – acgbox May 12 '20 at 20:39
  • You can ask another question, It doesn't resize because you didn't install guest addons. That has been asked many times. – Pilot6 May 12 '20 at 20:41
  • guest additions is installed and not working as it should. Please, it's not the question I'm asking. it just doesn't work as it should (same as other versions) – acgbox May 12 '20 at 20:44
  • What is the guest system? I suggest asking another question about "not working as it should". I suspect the addons didn't build properly. – Pilot6 May 12 '20 at 20:48
  • 1
    @ajcg I was confused, I guess there was a discussion about the difference between a repo and a ppa. – Organic Marble May 12 '20 at 20:56
  • 1
    @OrganicMarble I also had that confusion but a 'user535733' cleared it up and fix the post. – acgbox May 12 '20 at 20:58