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?

1 Answer 1


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

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, 2017 at 1:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .