Last Updated: 30-06-2020

Setting the name of your RPi is a straightforward task that requires simply editing 2 files and rebooting. To set the name of your RPi to ‘RPi4Programmer’

Edit the file /etc/hosts and set the name for the address 127.0.1.1

pi@raspberrypi: cat /etc/hosts
127.0.0.1		localhost
::1			localhost ip6-localhost ip6-loopback
ff02::1			ip6-allnodes
ff02::2			ip6-allrouters
127.0.1.1		RPi4Programmer
pi@raspberrypi: 

Edit /etc/hostname and set the name

pi@raspberry: car/etc/hostname
RPi4Programmer
pi:raspberry:

Reboot and your raspberry pi should now have your new name

pi@RPi4Programmer:

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: