get XO id via bash

Mikus Grinbergs mikus at
Fri Feb 25 14:39:39 EST 2011

> how to get the XO unique identifier using bash?

Please be more explicit in what you mean by "identifier".

To get the serial number:

  >   if [ -e /ofw/serial-number ]; then
  >     echo "Serial    : "`cat /ofw/serial-number`
  >   fi

To get the radio MAC address:

  Get output of 'ifconfig eth0', then extract the string
  after the label "HWaddr"

To get the name given to Sugar:

  Get output of 'gconftool-2 --direct
    /desktop/sugar/user/nick --get'

    [That command is all on one line]

To get the name given to NetworkManager:

  Get output of 'hostname' (and parse if need be)


More information about the Devel mailing list