Skip to content

Instantly share code, notes, and snippets.

View ubogdan's full-sized avatar

Bogdan Ungureanu ubogdan

View GitHub Profile
@ubogdan
ubogdan / system_uuid.sh
Created July 11, 2018 21:14 — forked from bencord0/system_uuid.sh
Unique id for a linux system
#!/bin/bash
cat /var/lib/dbus/machine-id && exit
# Provided by dbus, hence available on all systemd systems.
# Any user can read it and it is persistent accross boots.
# It is unique per installation, and works well in VMs.
# Not all systems (i.e. stage3 gentoo/handbook install)
# have dbus installed by default.
cat /sys/class/dmi/id/product_uuid && exit
04bef3edd3141dea213a0da5b4280a2b19e24e9e3c1cc17a5aa7f72f8f6fc9b7853be8e27fed8883337e5c5c010f613c7bda350491ff92ce01eebb8f8ada89143f