1.0.4 • Published 8 years ago

hostnamegen v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

hostname Generator

The unique identifier generator for RPi

TESTE ET FONCTIONNEL SUR Raspberry Pi / Raspbian ONLY !

Install

sudo npm install -g hostnamegen

How does it work ?

  • On RPi, a unique identifier depending ONLY from the CPU can be found into /proc/cpuinfos : Serial line (exple : 000000003f14bce2 )

  • This unique identifier is not dependent from the OS or the SD card so you can cahnge and use any and still have the same identifier.

  • Once this serial UID extracted, it is converted from base16 (Hex) to Base32 from Douglas Crockford to be more human friendly.

  • Change /etc/hostname & /etc/hosts files.

Usage

hostnamegen

Generate a UID based on CPU Serial and print it only.

sudo hostnamegen -s 

Generate and Setup hostname, need reboot after use to take effect.

sudo hostnamegen -s myhostname

Setup Hostname with specific hostname in params, need reboot after use to take effect.