How do I install (for example with apt-get install command) the new version of virtual box 5.1.22 (while i have 5.1.18) with command line? What commands do I use?


I would use gdebi for this:

sudo apt-get install gdebi-core

Then you can install any debian installer file with ...

sudo gdebi virtualbox-5.1.22.deb

Advantage: this will also check and install dependencies.

| improve this answer | |
  • do i have to download the package first? – Exis_Touf May 14 '17 at 13:21
  • Yes. and all dependencies that are not default. – Rinzwind May 14 '17 at 13:22

just type command sudo apt install virtualbox and it will upgrade your Virtualbox.also command sudo apt sudo apt upgrade virtualbox will do the same

| improve this answer | |
  • Are you sure? That should ONLY work if he has a PPA with 5.1.22 in it. – Rinzwind May 14 '17 at 13:00
  • i just tried this in my terminal and then post these commands and have just installed Ubuntu mate 16.04 which is very clean with no additional PPA – voldemort May 14 '17 at 13:02
  • Shall i try this or there will be any drawback? – Exis_Touf May 14 '17 at 13:20
  • No. there are no drawback.but it is simple way.if it doesn't work then try other answer. – voldemort May 14 '17 at 13:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.