Getting a unique id from a unix-like system

前端 未结 15 2389
不知归路
不知归路 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:06

    You mentioned that on Windows you use some GUID... Do you have some details about how it is created?

    Apart from that, you could try something like CPU ID, or hard disk ID... I suppose those cannot be changed (but you will run into trouble if a faulty hard disk is replaced).

提交回复
热议问题