3.4 KiB
How To Find Virtualbox Version From Commandline In Linux
I use Oracle VirtualBox and KVM virtualization applications to test different Linux operating systems. While I use KVM occasionally, Virtualbox is always my first choice. It is not because I don’t like KVM, but because I simply get used to Virtualbox. When using Virtualbox on my Ubuntu headless server, I needed to find Virtualbox’s version. If it is a GUI, I could easily find it by navigating to Virtualbox - > About -> Help. But mine is Ubuntu server which doesn’t has GUI. If you’re ever wondering how to find Virtualbox version from commandline in Linux, here are few ways to do it.
Find Virtualbox Version From Commandline In Linux
To find the version of installed Virtualbox, open the Terminal and run the following command:
$ vboxmanage --version
Sample output:
5.2.18_Ubuntur123745
Find Virtualbox Version From Commandline In Linux
As you can see in the above output, the version of installed Virtualbox is 5.2.
The yet another way to find virtualbox version is:
$ vbox-img --version
Sample output:
5.2.18_Ubuntur123745
Alternatively, you can use “head” and “awk” commands to find the Virtualbox version.
$ virtualbox --help | head -n 1 | awk '{print $NF}'
Sample output:
5.2.18_Ubuntu
Or, use “echo” command combined with “head” and “awk” commands:
$ echo $(virtualbox --help | head -n 1 | awk '{print $NF}')
Sample output:
5.2.18_Ubuntu
The above commands will work on any Linux distributions. If you’re on Ubuntu specifically, you can use “dpkg” command to check Virtualbox version.
$ dpkg -l | grep virtualbox | awk '{print $3}'
Sample output:
5.2.30-130521~Ubuntu~bionic
5.2.18-dfsg-2~ubuntu18.04.5
That’s it. These are couple ways to find the version of Oracle Virtualbox from Terminal in Linux. Hope this was useful.
Reference:
via: https://www.ostechnix.com/how-to-find-virtualbox-version-from-commandline-in-linux/