osinfo-query (1) Linux Manual Page
osinfo-query – Query information in the database
Synopsis
osinfo-query [OPTIONS…] TYPE [CONDITION-1 [CONDITION-2 …]]Description
The "osinfo-query" command allows extraction of information from the database. TYPE can be one of "os", "platform", "device", or "deployment". With no conditions specified, all entities of the given type will be listed.
# List all operating systemsConditions allow filtering based on specific properties of an entity. For example, to filter only distros from the Fedora Project, use
$ osinfo-query os
Short ID | Name …
———————-+———–
centos-6.0 | CentOS 6.0 …
centos-6.1 | CentOS 6.1 …
…
# List all operating systemsThe set of fields which are printed can be controlled using the "–fields" command line argument:
$ osinfo-query os vendor="Fedora Project"
Short ID | Name …
———————-+————–
fedora1 | Fedora Core 1 …
fedora2 | Fedora Core 2 …
…
# List all operating systems
$ osinfo-query –fields=short-id,version os vendor="Fedora Project"
Short ID | Version
———————-+———-
fedora1 | 1
fedora2 | 2
…
Options
- -s PROPERTY, –sort-key PROPERTY
- Set the data sorting key. Defaults sorting the first column
- -f PROPERTY1,PROPERTY2,…, –fields PROPERTY1,PROPERTY2,…
- Set the visibility of properties in output
Property Names
OS
Valid property names for the "os" type are:- short-id
- The short OS identifier
- name
- The long OS name
- version
- The OS version string
- family
- The OS kernel family
- vendor
- The OS vendor
- release-date
- The OS release date
- eol-date
- The OS end-of-life date
- codename
- The OS code name
- id
- The OS identifier
PLATFORM
Valid property names for the "platform" type are:- short-id
- The short platform identifier
- name
- The long platform name
- version
- The platform version string
- vendor
- The platform vendor
- release-date
- The platform release date
- eol-date
- The platform end-of-life date
- codename
- The platform code name
- id
- The platform identifier
DEVICE
Valid property names for the "device" type are:- name
- The device name
- product
- The device product name
- product-id
- The device product ID string
- vendor
- The device vendor name
- vendor-id
- The device vendor ID string
- class
- The device type class
- bus
- The device bus type
- id
- The device identifier
DEPLOYMENT
Valid property names for the "deployment" type are:- id
- The deployment identifier
