LinuxCommandLibrary

idevice_id

Get connected iOS device identifier (UDID)

TLDR

List the UDIDs of all attached devices

$ idevice_id --list
copy

List the UDIDs of all devices available via the network
$ idevice_id --network
copy

SYNOPSIS

idevice_id [-u UDID] [-l] [-d] [-v] [-h] [-V]

PARAMETERS

-u, --udid UDID
    Target specific device by its UDID

-l, --list
    List UDIDs of all connected devices

-d, --debug
    Enable communication debugging

-v, --verbose
    Enable verbose output

-h, --help
    Print usage information

-V, --version
    Print version information

DESCRIPTION

The idevice_id command is a utility from the libimobiledevice library, designed for Linux and other Unix-like systems to interact with Apple iOS devices such as iPhones, iPads, and iPods. It fetches the unique device identifier (UDID), a 40-character hexadecimal string that uniquely identifies each device.

This tool relies on the usbmuxd daemon for USB multiplexing and communication over USB. When executed without arguments, it connects to the first available iOS device and outputs its UDID. It's essential for scripting device management, automation, and tools like ideviceinstaller or idevicebackup.

libimobiledevice provides open-source alternatives to iTunes for device handling, bypassing proprietary Apple software. Users must ensure the device is unlocked, trusted (by tapping 'Trust' on the device screen), and connected via USB. No jailbreak is required for basic UDID retrieval.

CAVEATS

Requires libimobiledevice and usbmuxd installed; device must be USB-connected, unlocked, and trusted. Fails if no device detected or multiple untargeted devices present without -l.

EXAMPLES

idevice_id # Prints UDID of first device
idevice_id -l # Lists all connected UDIDs
idevice_id -u 00008020-00123456789ABCDE # Targets specific device

INSTALLATION

Typically via package managers: apt install libimobiledevice-utils (Debian/Ubuntu) or dnf install libimobiledevice (Fedora).

HISTORY

Part of libimobiledevice project, initiated in 2007 by Nikias Bassen to support iOS on Linux post-iPhone launch. idevice_id added early for core device identification; actively maintained with iOS version compatibility updates.

SEE ALSO

Copied to clipboard