hostname might be the best option. This way, you can even identify each Pi over the network. Another advantage to this method is that it shows the hostname (by default) at the beginning of each line in the command line.
If you had ten RPis in room A-14, then you could change the hostname on each one to:
and so on. Or, to make it smaller:
If you had different models, you could also include the model name in the hostname:
These hostnames would be visible on the network and you could
ssh into any of them without their respective IP address.
There are three ways to change the hostname in Raspbian.
sudo hostname -b "NEWHOSTNAME"
will change the hostname to
NEWHOSTNAME upon the next boot.
Bring up the Raspbian config with:
Scroll down to
advanced options, and then the second option is
hostname. Type in what you want the new hostname to be, and it will change upon the next boot.
You can edit
sudo nano /etc/hosts and change this line:
raspberrypi to your new hostname. Don't change any of the other lines.
You don't have to do all three methods, just one will be enough!
Something important to note:
This is not hardware dependent. At all. Even if you replace the entire RPi, as long as you are using the same sd card, the hostname will not change. You can even move the sd card between models and it will keep the hostname you have set.