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".

Dave Jones
  • 3,978
  • 15
  • 22
  • 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. – HeatfanJohn Jul 16 '13 at 15:58

2 Answers2

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.

Peter Mortensen
  • 2,004
  • 2
  • 15
  • 18
Gerben
  • 2,420
  • 14
  • 17
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
goldilocks
  • 58,859
  • 17
  • 112
  • 227
  • Its still showing Raspberry Pi in my network showing tool :/ – ParisNakitaKejser Jul 16 '13 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 '13 at 11:30