(incus_list.md)=
# `incus list`

List instances

## Synopsis
```{line-block}

Description
  List instances

  A single keyword like "web" which will list any instance with a name starting by "web".
  A regular expression on the instance name. (e.g. .*web.*01$).
  A key/value pair referring to a configuration item. For those, the
  namespace can be abbreviated to the smallest unambiguous identifier.
  A key/value pair where the key is a shorthand. Multiple values must be delimited by ','. Available shorthands:
    - type={instance type}
    - status={instance current lifecycle status}
    - architecture={instance architecture}
    - location={location name}
    - ipv4={ip or CIDR}
    - ipv6={ip or CIDR}

  Examples:
    - "user.blah=abc" will list all instances with the "blah" user property set to "abc".
    - "u.blah=abc" will do the same
    - "security.privileged=true" will list all privileged instances
    - "s.privileged=true" will do the same
    - "type=container" will list all container instances
    - "type=container status=running" will list all running container instances

  A regular expression matching a configuration item or its value. (e.g. volatile.eth0.hwaddr=10:66:6a:.*).

  When multiple filters are passed, they are added one on top of the other,
  selecting instances which satisfy them all.

Columns (default layout: [with --all-remotes, R][with --all-projects, e]ns46tS[L when clustered])
  The -c option takes a list of columns that control which attributes to output when displaying a table (table or csv format).
  The columns can be specified with consecutive shorthand characters (optionally separated with commas), among the following:
    4: IPv4 address
    6: IPv6 address
    a: Architecture
    b: Storage pool
    c: Creation date
    d: Description
    D: Disk usage
    e: Project
    f: Base image fingerprint (short)
    F: Base image fingerprint (long)
    l: Last used date
    L: Location (cluster member)
    m: Memory usage
    M: Memory usage (%)
    n: Name
    N: Number of running processes
    p: Init process PID
    P: Profiles
    R: Remote name
    s: State
    S: Number of snapshots
    t: Type
    u: CPU usage (in seconds)
    U: Start date

Custom columns (separated with commas)
  Custom columns can be defined with "[config:|devices:]<key>[:<name>][:<width>]":
    <key>:   Extended configuration or device key to display (if [config:|devices:] is omitted, it defaults to config:)
    <name>:  Name to display in the column header (defaults to <key> if not specified or empty)
    <width>: Max column width (longer results are truncated), 0 = limit to header width, -1 = unlimited (defaults to -1)

```
```
incus list ([<remote>:]|--all-remotes) [<filter>...] [flags]
```

## Examples

```
  incus list -c nFs46,volatile.eth0.hwaddr:MAC,config:image.os,devices:eth0.parent:ETHP
    Show instances using the "NAME", "BASE IMAGE", "STATE", "IPV4", "IPV6" and "MAC" columns.
    "BASE IMAGE", "MAC" and "IMAGE OS" are custom columns generated from instance configuration keys.
    "ETHP" is a custom column generated from a device key.

  incus list -c ns,user.comment:comment
    List instances with their running state and user comment.
```

## Options

```
      --all-projects[=true|false]   Display instances from all projects
      --all-remotes[=true|false]    Display instances from all remotes
  -c, --columns                     Columns (default "ns46tS")
      --fast[=true|false]           Fast mode (same as --columns=[Re]nsacPt[L])
  -f, --format string               Format (csv|json|table|yaml|compact|markdown), use suffix ",noheader" to disable headers and ",header" to enable them if missing, and suffix ",raw" to skip formatting numeric units, e.g. csv,header,raw (default "table")
```

## Options inherited from parent commands

```
      --debug[=true|false]          Show all debug messages
      --explain[=true|false]        If the command is valid, explain its parsed arguments instead of running it
      --force-local[=true|false]    Force using the local unix socket
  -h, --help[=true|false]           Print help
      --project                     Override the source project
  -q, --quiet[=true|false]          Don't show progress information
      --sub-commands[=true|false]   Use with help or --help to view sub-commands
  -v, --verbose[=true|false]        Show all information messages
      --version[=true|false]        Print version number
```

## SEE ALSO

* [incus](incus.md)	 - Command line client for Incus

