---
name: "ifquery-ng"
section: "8"
platform: "linux"
package: "ifupdown-ng"
version: "0.12.1-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ifquery-ng"
---

# ifquery-ng(8)

query interface configuration and state

## NAME

ifquery - query interface configuration and state

## SYNOPSIS

**ifquery** \[\<*options*\>...\] \<*interfaces*...\>

**ifquery** -L\|--list

**ifquery** -s\|--state

## DESCRIPTION

**ifquery** is used to extract information from the interface configuration file.  It can also be used to convert from old versions of the interface configuration file to the current format.

## OPTIONS

- **-a, --auto**

  Only match interfaces that are marked as *auto*.

- **-h, --help**

  Display supported options to ifquery.

- **-i, --interfaces** *FILE*

  Use *FILE* as the config database.

- **-p, --property** *PROPERTY*

  Print the values of matching properties for an interface.

- **-r, --running**

  Print the interface names that are marked as running in the state database.

- **-s, --state**

  Query the state database instead of the config database.

- **-D, --dot**

  Generate a dependency graph that can be used with GraphViz [**dot**(1)](/dot/1.md).  Used with **--list**.

- **-I, --include** *PATTERN*

  Include *PATTERN* when matching against the config or state database.

- **-L, --list**

  List interfaces which exist in the configuration database.

- **-P, --pretty-print**

  When listing interfaces, print their configuration in a format that is compatible with [**interfaces**(5)](/interfaces/5.md) files.

- **-U, --allow-undefined**

  Create virtual interfaces for any interfaces not explicitly defined in the configuration file.  This is primarily useful for property queries.

- **-S, --state-file** *FILE*

  Use *FILE* as the state database.

- **-T, --timeout** *TIMEOUT*

  Wait up to *TIMEOUT* seconds for executors to complete before raising an error.

- **-V, --version**

  Print the ifupdown-ng version and exit.

- **-X, --exclude** *PATTERN*

  Exclude *PATTERN* when matching against the config or state database.

## SEE ALSO

[**ifup**(8)](/ifup/8.md)\
 [**ifdown**(8)](/ifdown/8.md)\
 [**interfaces**(5)](/interfaces/5.md)

## AUTHORS

Ariadne Conill \<ariadne@dereferenced.org\>
