19

I have a Dell laptop that has an assigned service tag on it. However, this sticker is in an inconvenient place (on the bottom of the laptop), and I'm too lazy to unplug everything and turn it over to read the service tag.

Is there a way I can get the service tag from the Terminal or similar?

34

Any Dell's service tag can be read from the system using the ever-so-handy dmidecode tool.

The service tag is stored in the BIOS as a DMI/SMBIOS string, namely system-serial-number. It can be read using the below command:

sudo dmidecode -s system-serial-number

This command will output the service tag as just itself, so it can be passed into a script or similar without much worry.

$ sudo dmidecode -s system-serial-number
1ABC123

If the Express Service Code is needed, that's easily retrievable using a similar command:

echo $((36#$(sudo dmidecode -s system-serial-number)))

This command will output the Express Service Code to the terminal, much in the same way the Service Tag is outputted. It works by converting the Base36 Service Tag to the Base10 Express Service Code using Bash's $((base#number)) notation.

  • found this solution somewhere else and it wasn't working for me, I wasn't running it as root, +1 for giving me the hint. :) – msb Oct 25 '17 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.