osinfo-query(1)

πŸ¦‹ osinfo-query(1) β€” the Libosinfo glow-up 🌸

okay so bestie, welcome to the osinfo-query man page, it's giving very much "let me look something up in the Libosinfo database real quick" and honestly? iconic.


✨ NAME ✨

osinfo-query β€” literally just query information in the database πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ’– DESCRIPTION πŸ’–

So the osinfo-query command lets you extract information from the database. That's the whole vibe. 🫢

TYPE can be one of os, platform, device, or deployment. And if you don't specify any conditions at all, it just lists all the entities of the type you asked for. No filter, no stress, all the rows. ✨

# List all operating systems
$ osinfo-query os
 Short ID             | Name       ...
----------------------+-----------
 centos-6.0           | CentOS 6.0 ...
 centos-6.1           | CentOS 6.1 ...
 ...

Conditions are how you filter based on specific properties of an entity. For example, if you only want distros from the Fedora Project, you'd go:

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

And the set of fields that get printed? Fully yours to control with the --fields command line argument, love that for you:

# 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 β€” sets the data sorting key. Default behaviour sorts by the first column, no cap.
  • -f PROPERTY1,PROPERTY2,..., --fields PROPERTY1,PROPERTY2,... β€” sets the visibility of properties in the 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

πŸ’€ EXIT STATUS πŸ’€

The exit status is 0 if matching entries were found, or 1 if no matches were found. That's it, that's the whole drama 🫢


🌟 SEE ALSO 🌟

osinfo-db-validate(1), osinfo-detect(1)


πŸŽ€ AUTHORS πŸŽ€

Daniel P. Berrange <berrange@redhat.com>


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


πŸ’œ 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.

fr fr read that last bit β€” NO warranty, bestie, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, so don't come for anyone if it acts up πŸ™ˆ

okay that's the whole page, mwah πŸ’‹ β€” brought to you by libosinfo-1.12.0, dated 2024-12-02, page name osinfo-query(1). go query something cute, ily, bye! 🌸✨

πŸ“¦ where this page comes from