Skip to content

Instantly share code, notes, and snippets.

@rvill
Created January 16, 2015 04:05
Show Gist options
  • Save rvill/60ce9d7016581b84c343 to your computer and use it in GitHub Desktop.
Save rvill/60ce9d7016581b84c343 to your computer and use it in GitHub Desktop.
get iOS device UDID without xcode or itunes, using linux cmd line
lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2
@diegorondini
Copy link

lsusb -d 05ac: -v 2>/dev/null | grep iSerial | awk '{print $NF}'

@meramsey
Copy link

A variation on @GoodMirek response that adds the hypen for you in the right spot(after the 8th character)

lsusb -s $(lsusb | grep "Apple" | cut -d ' ' -f 2):$(lsusb | grep "Apple" | cut -d ' ' -f 4 | sed 's/://') -v | grep iSerial | awk '{print $3}' | sed 's/^\(........\)/\1-/'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment