Skip to main content
Extended answer.
Source Link
Milliways
  • 61.5k
  • 32
  • 108
  • 212

The Pi has a unique Serial Number. This should uniquely identify each Pi. The Ethernet MAC is related to this, and similarly unique.

Any other solution, such as creating files or hostname involves storing something on the SD Card, so at best this identifies the SD Card. This may be what you want if you want to tie user data to the ID.

Edit Based on your comment there are still many answers, depending on what you want to achieve.

  1. If you want to distinguish users - give them a unique username. This is the traditional 'NIX approach.
  2. If you want to distinguish users machines on a network give each a unique hostname.

Either or these will give a visually distinct prompt, and you can combine both.

The Pi has a unique Serial Number. This should uniquely identify each Pi. The Ethernet MAC is related to this, and similarly unique.

Any other solution, such as creating files or hostname involves storing something on the SD Card, so at best this identifies the SD Card. This may be what you want if you want to tie user data to the ID.

The Pi has a unique Serial Number. This should uniquely identify each Pi. The Ethernet MAC is related to this, and similarly unique.

Any other solution, such as creating files or hostname involves storing something on the SD Card, so at best this identifies the SD Card. This may be what you want if you want to tie user data to the ID.

Edit Based on your comment there are still many answers, depending on what you want to achieve.

  1. If you want to distinguish users - give them a unique username. This is the traditional 'NIX approach.
  2. If you want to distinguish users machines on a network give each a unique hostname.

Either or these will give a visually distinct prompt, and you can combine both.

Source Link
Milliways
  • 61.5k
  • 32
  • 108
  • 212

The Pi has a unique Serial Number. This should uniquely identify each Pi. The Ethernet MAC is related to this, and similarly unique.

Any other solution, such as creating files or hostname involves storing something on the SD Card, so at best this identifies the SD Card. This may be what you want if you want to tie user data to the ID.