[ Version ( since = "2.64" ) ]
[ CCode ( cname = "g_get_os_info" ) ]
public string? get_os_info (string key_name)

Get information about the operating system.

On Linux this comes from the `/etc/os-release` file. On other systems, it may come from a variety of sources. You can either use the standard key names like g_os_info_key_name or pass any UTF-8 string key name. For example, `/etc/os-release` provides a number of other less commonly used values that may be useful. No key is guaranteed to be provided, so the caller should always check if the result is null.



a key for the OS info being requested, for example g_os_info_key_name.


The associated value for the requested key or null if this information is not provided.

Namespace: GLib.Environment
Package: glib-2.0