osinfo-query(1) Libosinfo osinfo-query(1)

# [NAME](#NAME)

osinfo-query - Query information in the database

# [SYNOPSIS](#SYNOPSIS)

osinfo-query \[OPTIONS...] TYPE \[CONDITION-1 \[CONDITION-2 ...]]

# [DESCRIPTION](#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 systems
  $ osinfo-query os
   Short ID             | Name       ...
  ----------------------+-----------
   centos-6.0           | CentOS 6.0 ...
   centos-6.1           | CentOS 6.1 ...
   ...
```

Conditions allow filtering based on specific properties of an entity. For example, to filter only distros from the Fedora Project, use

```
  # List all operating systems
  $ osinfo-query os vendor="Fedora Project"
   Short ID             | Name          ...
  ----------------------+--------------
   fedora1              | Fedora Core 1 ...
   fedora2              | Fedora Core 2 ...
   ...
```

The set of fields which are printed can be controlled using the **--fields** command line argument:

```
  # List all operating systems
  $ osinfo-query --fields=short-id,version os vendor="Fedora Project"
   Short ID             | Version
  ----------------------+----------
   fedora1              | 1
   fedora2              | 2
   ...
```

# [OPTIONS](#OPTIONS)

[**-s PROPERTY**, **--sort-key PROPERTY**](#s)

Set the data sorting key. Defaults sorting the first column

[**-f PROPERTY1,PROPERTY2,...**, **--fields PROPERTY1,PROPERTY2,...**](#f)

Set the visibility of properties in output

# [PROPERTY NAMES](#PROPERTY_NAMES)

## [OS](#OS)

Valid property names for the "os" type are:

[**short-id**](#short)

The short OS identifier

[**name**](#name)

The long OS name

[**version**](#version)

The OS version string

[**family**](#family)

The OS kernel family

[**vendor**](#vendor)

The OS vendor

[**release-date**](#release)

The OS release date

[**eol-date**](#eol)

The OS end-of-life date

[**codename**](#codename)

The OS code name

[**id**](#id)

The OS identifier

## [PLATFORM](#PLATFORM)

Valid property names for the "platform" type are:

[**short-id**](#short~2)

The short platform identifier

[**name**](#name~2)

The long platform name

[**version**](#version~2)

The platform version string

[**vendor**](#vendor~2)

The platform vendor

[**release-date**](#release~2)

The platform release date

[**eol-date**](#eol~2)

The platform end-of-life date

[**codename**](#codename~2)

The platform code name

[**id**](#id~2)

The platform identifier

## [DEVICE](#DEVICE)

Valid property names for the "device" type are:

[**name**](#name~3)

The device name

[**product**](#product)

The device product name

[**product-id**](#product~2)

The device product ID string

[**vendor**](#vendor~3)

The device vendor name

[**vendor-id**](#vendor~4)

The device vendor ID string

[**class**](#class)

The device type class

[**bus**](#bus)

The device bus type

[**id**](#id~3)

The device identifier

## [DEPLOYMENT](#DEPLOYMENT)

Valid property names for the "deployment" type are:

[**id**](#id~4)

The deployment identifier

# [EXIT STATUS](#EXIT_STATUS)

The exit status will be 0 if matching entries were found, or 1 if not matches were found

# [SEE ALSO](#SEE_ALSO)

[**osinfo-db-validate**(1)](/man/enterprise-packages/libosinfo/osinfo-db-validate.1), [**osinfo-detect**(1)](/man/enterprise-packages/libosinfo/osinfo-detect.1)

# [AUTHORS](#AUTHORS)

Daniel P. Berrange &lt;berrange@redhat.com&gt;

# [COPYRIGHT](#COPYRIGHT)

Copyright (C) 2012, 2014 Red Hat, Inc.

# [LICENSE](#LICENSE)

"osinfo-query" is distributed under the termsof the GNU LGPL v2+ license. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

2026-10-13 libosinfo-1.12.0

---

Document: osinfo-query(1) from libosinfo 1.12.0-r4 (Chainguard OS)
Source: https://gitlab.com/libosinfo/libosinfo
