# View device information

The [`ffx target`](https://fuchsia.dev/reference/tools/sdk/ffx#target) commands can retrieve various types of
information from Fuchsia devices.

## Concepts

The [`ffx target list`](https://fuchsia.dev/reference/tools/sdk/ffx#list_17) command prints the list of all
Fuchsia devices connected to the host machine. This command is often used
to quickly scan the following information of connected Fuchsia devices:

- A device name
- A device's product type
- A device's state
- A device's IP address

The [`ffx target show`](https://fuchsia.dev/reference/tools/sdk/ffx#show_8) command, unlike `ffx target list`,
targets only a single Fuchsia device and prints much detailed information
about the device. To do so, `ffx target show` requires that `ffx` can
establish a [SSH connection](https://fuchsia.dev/docs/development/tools/ffx/workflows/create-ssh-keys-for-devices) to the target device. Below
is some of the information you can obtain from `ffx target show`:

- The board name of the target device
- The version of the Fuchsia product running on the target device
- The product configuration on the target device

Lastly, the [`ffx target snapshot`](https://fuchsia.dev/reference/tools/sdk/ffx#snapshot) command
generates a ZIP archive file that captures the current state
of the target device. A snapshot from a device contains a generous
amount of information helpful for debugging.

## Get the list of devices

To get the list of all connected Fuchsia devices,
run the following command:

    ffx target list

This command prints output similar to the following:

    $ ffx target list
    NAME                      SERIAL       TYPE       STATE      ADDRS/IP                                             AGE     RCS
    fuchsia-5254-0063-5e7a    <unknown>    Unknown    Unknown    [172.16.241.43, fe80::7594:7308:4168:9fb1%brqemu]    0m8s    N

## Get detailed information from a device

To get the detailed information of your target Fuchsia device,
run the following command:

    ffx target show

This command prints output similar to the following:

    $ ffx target show
    Target:
        Name: "fuchsia-4102-0ba9-8a3b"
        SSH Address: "[fe80::ae21:e7fa:8e1f:6c46%17]:22"
    Board:
        Name: "<BOARD_NAME>"
        Revision: "<REVISION_NUMBER>"
        ...
    Device:
        Serial number: "<SERIAL_NUMBER>"
        ...
    Product:
        ...
        Build date: "<DATE>"
        Build name: "<BUILD>"
        ...
        Model: "<MODEL>"
        Name: "<NAME>"
        ...
    Update:
        Current channel: "<CHANNEL>"
        Next channel: "<CHANNEL>"
    Build:
        Version: "<VERSION>"
        Product: "<PRODUCT>"
        Board: "<BOARD>"
        Commit: "<DATE>"
    ...

## Generate a snapshot from a device

To generate a snapshot from your target Fuchsia device,
run the following command:

    ffx target snapshot

This command generates a ZIP archive file and prints its location,
for example:

    $ ffx target snapshot
    Exported /tmp/snapshots/20210616_183136/snapshot.zip

By default, the command stores the archive file in the `/tmp` directory of
the host machine. To change this directory,
run `ffx target snapshot --dir <PATH_TO_DIR>`.
[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/development/tools/ffx/workflows/view-device-information.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/development/tools/ffx/workflows/view-device-information.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/development/tools/ffx/workflows/view-device-information.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/development/tools/ffx/workflows/view-device-information.md "Edit the source code of this page")