Pages

Tuesday, June 23, 2015

Get your mac device's (iPhone/iPad) UDID from the command line

Add this to your .bashrc or .bash_aliases
alias udid="system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | tail -n1 | sed 's/Serial Number: //'"
Then hit
udid
.