Raspberry Pi Beginner Projects: Give your Pi a name
<< Previous
First
2
3
4
5
6
7
8
Last
Next >>
Raspberry Pi Beginner Projects: Setting Up Raspberry Pi Beginner Projects: Parts List Raspberry Pi Beginner Projects: Putting The Hardware Together Raspberry Pi Beginner Projects: Raspbian Operating System Raspberry Pi Beginner Projects: Updating Raspbian Raspberry Pi Beginner Projects: Installing VNC Raspberry Pi Beginner Projects: Using SSH and SFTP Raspberry Pi Beginner Projects: Give your Pi a name Raspberry Pi Beginner Projects: Making The File System Visible
Changing the name of your PiThe defaults name or "hostname" of your Raspberry Pi running Raspian is "raspberrypi". This is OK and on the next page I show you how to set up a SAMBA server which will make your Pi visible on your network. You will be able to identify the device by it's name. This is great provided that you only every plan to have one Raspberry Pi on your network. If you put more than one on the network without changing the hostname then you will only be able to see one of them and I'm not sure which one it will be. So to avoid this potential problem I will show you how to change the hostname of your Pi so that you can avoid any confusion later. The first problem you are going to have is deciding on a name to give your Pi. In the past I have spent hours trying to think of catchy names to give machines. Names that I can remember and that are unique on my network. I can't choose one that I've already used because that would confuse me even if I no longer use the old machine that had the name. What I and others that I know do is think of a theme. Some people choose names of snakes or breeds of dogs or even countries. I personaly use the theme "female super heroes" which has served me well so far. My first Raspberry Pi has just been named "Raptor". This isn't one of the better known super heroes I know but I have used up most of the good ones. I had to resort to a list on Wikipedia this time. So pick a fun theme and then decide on a name that fits with the theme for your Pi. I will use the name "raptor" as the new hostname in the following examples. The hosts fileFirst we edit the hosts file to make sure that your Pi knows it's network name when typed at a Pi terminal:
pi@192.168.0.25~ $ cd /etc
Change the line:
Then save the file:
pi@raptor /etc $ The hostname fileThe "hostname" file is also in the /etc directory and contains nothing but the hostname string. Use the nano editor again to change the contents from "raspberrypi" to "raptor". Or whatever name you want to give your Pi. pi@raptor /etc $ sudo nano hostname When you have changed the hostname file you must commit the change for it to take effect: pi@raptor /etc $ sudo /etc/init.d/hostname.sh Notice that you must supply the full path to the hostname.sh file. For all these changes to take effect you should reboot your Pi now: pi@raptor /etc $ sudo reboot On the next page I show you how to make your Pi's file system visible on your network.
<< Previous
First
2
3
4
5
6
7
8
Last
Next >>
Raspberry Pi Beginner Projects: Setting Up Raspberry Pi Beginner Projects: Parts List Raspberry Pi Beginner Projects: Putting The Hardware Together Raspberry Pi Beginner Projects: Raspbian Operating System Raspberry Pi Beginner Projects: Updating Raspbian Raspberry Pi Beginner Projects: Installing VNC Raspberry Pi Beginner Projects: Using SSH and SFTP Raspberry Pi Beginner Projects: Give your Pi a name Raspberry Pi Beginner Projects: Making The File System Visible |
Now subscribe to our newsletter and don't miss a thing |
|
Comments
No comments yet.Add Comment