You can display additional information on the loginscreen of macOS. After applying the command you can click on the clock in the upper right corner, toggle between clock, IP address, macOS version and computer name. The information will be displayed for only 60 seconds.
Use the following command to active the additional information:
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
Reboot your mac, to make changes affect.
Disable the additional information (defaults) with:
sudo defaults delete /Library/Preferences/com.apple.loginwindow AdminHostInfo
Example:
Too cool! Thank you for this. Is it possible to get the serial number in there too?
this is an option in system preferences already.