TranslateProject/sources/tech/20190710 How To Find Virtualbox Version From Commandline In Linux.md
2019-07-11 08:53:29 +08:00

3.4 KiB
Raw Blame History

How To Find Virtualbox Version From Commandline In Linux

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 dont like KVM, but because I simply get used to Virtualbox. When using Virtualbox on my Ubuntu headless server, I needed to find Virtualboxs version. If it is a GUI, I could easily find it by navigating to Virtualbox - > About -> Help. But mine is Ubuntu server which doesnt has GUI. If youre 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 youre 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

Thats 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/

作者:sk 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出