---
title: "swx-where"
slug: "swx-where"
updated: 2025-10-21T18:39:50Z
published: 2025-10-21T18:39:50Z
canonical: "docs.swxtch.io/swx-where"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# swx-where

WHAT TO EXPECT

swx-where allows users to call for hardware and cloud information regarding their cloudSwXtch component VM.

  

**In this article,** users will learn about the different arguments they can use with swx-where and the example outputs they should expect.

### swx-where Cloud Type

Below are the Linux and Windows commands to call swx-where. An empty command (without an argument), like the examples below, will only return the cloud type.

```shell
$ swx-where -h
Usage: swx-where [--help] [--version] [--format VAR] [--regionsFile VAR]

swx-where utility.
Calling with no arguments simply returns the cloud type.

Optional arguments:
  -h, --help         shows help message and exits
  -v, --version      prints version information and exits
  -f, --format       output format (example: "json")
  -r, --regionsFile  Path to a JSON file containing the cloud regions display names. [nargs=0..1] [default: ""]
```

> [!WARNING]
> NOTE
> 
> To execute swx-where on the swXtchBridge, you have to use the following command: `docker exec -it swx-bridge swx-where`.

### swx-where Format

What is probably the most useful option in the `swx-where` argument list is `-f json` or `--format json`, which provides users with a JSON of hardware-related information regarding the cloudSwXtch VM. This information is similar to the Hardware view in swxtch-top and Hardware panel in wXcked Eye's Settings' General tab. It presents a breakdown of the control and data subnet with information categorized as either metadata or operating system.

```shell
swx-where -f json
```

**Example Output in Windows:**

```shell
PS C:\Users\Administrator> swx-where.exe --format json
{
  "cloudType": "AWS",
  "imdsProbeResults": {
    "ALIBABA": 0,
    "AWS": 200,
    "AZURE": 401,
    "GCP": 401,
    "OCI": 401
  },
  "instanceType": "m5.xlarge",
  "nics": [
    {
      "computed": {
        "isPreferredControlNic": true,
        "isPreferredDataNic": false,
        "isSRIOV": false
      },
      "meta": {
        "ipAddress": "172.51.128.8",
        "ipBroadcast": "172.51.128.255",
        "ipSubnet": "172.51.128.0",
        "mac": "06:2f:2a:47:90:2f",
        "subnetMask": "255.255.255.0",
        "vpc": "vpc-029879464f8431389"
      },
      "os": {
        "driver": "ena.sys",
        "ifIndex": 8,
        "ipAddress": "172.51.128.8",
        "ipBroadcast": "172.51.128.255",
        "ipSubnet": "172.51.128.0",
        "mac": "06:2f:2a:47:90:2f",
        "mtu": 1500,
        "name": "Ethernet 3",
        "pciAddress": "0000:00:05.0",
        "state": "up",
        "subnetMask": "255.255.255.0"
      }
    },
    {
      "computed": {
        "isPreferredControlNic": false,
        "isPreferredDataNic": true,
        "isSRIOV": false
      },
      "meta": {
        "ipAddress": "172.51.144.219",
        "ipBroadcast": "172.51.144.255",
        "ipSubnet": "172.51.144.0",
        "mac": "06:7e:c7:7d:83:35",
        "subnetMask": "255.255.255.0",
        "vpc": "vpc-029879464f8431389"
      },
      "os": {
        "driver": "ena.sys",
        "ifIndex": 12,
        "ipAddress": "172.51.144.219",
        "ipBroadcast": "172.51.144.255",
        "ipSubnet": "172.51.144.0",
        "mac": "06:7e:c7:7d:83:35",
        "mtu": 1500,
        "name": "Ethernet 4",
        "pciAddress": "0000:00:06.0",
        "state": "up",
        "subnetMask": "255.255.255.0"
      }
    }
  ],
  "region": "us-west-1",
  "version": "b6e4d030933ba6aaf65bac1f6b8e2860c28808ed/2025-09-17T17:30:14Z"
}
```

> [!TIP]
> NOTE
> 
> The output can be exported to a file using the > redirector. For example, to export the JSON report to a file named report.json:
> 
> ```shell
> swx-where -f json > report.json
> ```
