E
E
ebroker2021-10-28 01:20:31
ubuntu
ebroker, 2021-10-28 01:20:31

How to get the unique unix id of a machine?

I have a single board computer running Ubuntu 18.04 installed on an SD card. It is necessary to obtain a unique identifier for this computer tied to the serial numbers of the processor, and the identifier must not change after the system is rebooted.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Saboteur, 2021-10-28
@saboteur_kiev

try
1. hostid
2. cat /etc/machine-id
3. md5sum /proc/cpuinfo 4. blkid
|grep UUID|md5sum
5. dmidecode |grep -i uuid
that Linux can get it. And to get attached to the list of processors + drives and other things that do not change during reboot - you can simply generate a text report and run it through md5

A
Adamos, 2021-10-28
@Adamos

This single-board has a built-in network card for sure, and it has a unique MAC, which is easy to get with one command without digging into the output of more complex utilities.

P
pfg21, 2021-10-28
@pfg21

lsw??
*-core
********************
description: Motherboard
version: Rev x.xx
serial: MS1C85B12X00871
slot: To Be Filled By OEM
*-firmware
description: BIOS
**** *********
version: 0709
date: 12/05/2008
*-cpu
description: CPU
**************
serial: To Be Filled By OEM

A
Alexander Karabanov, 2021-10-31
@karabanov

Machine ID

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question