4

When I search my network for devices, all my Raspberry Pi's are coming up with the name "Raspberry Pi".

How can I change that name? Because when I use my Raspberry Pi's it's easier to connect to a single one with the right name.

Currently it takes too long to try my tests out.

I hope I can change the name on the network to "PiAMP numb. X".

1
  • Is the name "Raspberry Pi" with a space or "RaspberryPi" without a space? My guess is the later as a space is not a valid character in a host name, at least as far as I know. Also, how many Raspberry Pi units do yo have? I'm just curious. Jul 16, 2013 at 15:58

2 Answers 2

4

See man hostname:

Hostname is used to display the system's DNS name, and to display or set its hostname or NIS domain name.

To make the change permanent, change "raspberrypi" to whatever in:

/etc/hostname
/etc/hosts
2
  • Its still showing Raspberry Pi in my network showing tool :/ Jul 16, 2013 at 10:39
  • @ParisNakitaKejser Whatever hostname reports (with no args) is the hostname the system is using. What is your "network showing tool"? Maybe it has something cached for the pi's IP or MAC address or something and needs to update or reset its records...
    – goldilocks
    Jul 16, 2013 at 11:30
6

Changing the hostname is part of raspi-config (the thing you see when you first boot the Raspberry Pi). Just run:

sudo raspi-config

You'll get a nice GUI. Choose 8 Advanced Options and then A2 Hostname, and follow the instructions.

1
  • Its still showing Raspberry Pi in my network showing tool :/ Jul 16, 2013 at 10:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.