2016년 2월 28일 일요일

How To – Change Hostname on Raspberrypi

How To – Change Hostname on Raspberrypi

To change the hostname
You need to edit 2 files replace raspberry with <name> this is what you choose and does not need <> brackets
1. Edit the hostname file
sudo nano /etc/hostname
raspberry
You will see raspberry change this to whatever you want (one word with  limited characters apply) <name>
CTRL+X press Y then hit Enter
2. Next you need to change the hosts file
sudo nano/etc/hosts
Change the entry 127.0.1.1 raspberry
To 127.0.1.1 <name>
Test with:
cat /etc/hosts
It should return the new name you gave it if not repeat the steps above
3. Reboot
When you login you will see pi@<name> ~ this is your new prompt
sudo reboot

댓글 없음:

댓글 쓰기