Getting a unique id from a unix-like system

前端 未结 15 2417
不知归路
不知归路 2020-11-27 18:22

I want to get from any Unix-like system (if this is possible) a unique id that will be persistent every time my application runs in the same machine. If it is possible, I wa

15条回答
  •  暖寄归人
    2020-11-27 19:10

    Another option is to use information derived from dmidecode, a command present on linux. This information is decoded from /dev/mem, therefore requiring root access.

    The information dmidecode reads is known to be flawed, as some motherboard manufacturers lie or fake some of the fields.

提交回复
热议问题