Getting a unique id from a unix-like system

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

    You have to consider that a lot of setups may have created a filesystem image and cloned to many machines, rather than setting them up individually. In other cases, a machine could get re-setup many times. In other words, anything the OS provided can't be trusted.

    However, the CPU does keep a unique serial number, but access to it should be different on different systems.

提交回复
热议问题