LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Ubuntu (http://www.linuxquestions.org/questions/forumdisplay.php?f=63)
-   -   How do I change name of server on local network? (http://www.linuxquestions.org/questions/showthread.php?t=677955)

joeman3429 10-21-2008 01:32 AM

How do I change name of server on local network?
 
I just installed Ubuntu 8.04 server edition, and I'm just trying to figure out how to be able to refer to the computer on my local network by it's name. When I installed, I named it joebuntu (I know, clever), but when I try to go to http://joebuntu, or even joebuntu:80, or ssh into joe@joebuntu, it doesn't find it.

Naturally if I replace joebuntu with it's local ip it works fine.

So am I missing something really simple? I feel like this normally works just fine how I want it too.

billymayday 10-21-2008 01:36 AM

How many computers on your network? If only a couple, you can add the name to the hosts file - something like

Code:

1.2.3.4      joebuntu
If you havea lot of machines you'd be better off setting up a dns server.

joeman3429 10-21-2008 01:50 AM

in the /etc/hosts file I already have an entry:
127.0.1.1 joebuntu.gateway.2wire.net joebuntu

uh, 2wire is the name of my router btw.

Is that what's causing the problem? Hmm, I changed it to

127.0.1.1 joebuntu

and reboot, but it didn't seem to have an effect.

And yeah, just 3 computers on a home network.

tredegar 10-21-2008 07:09 AM

You need another line in /etc/hosts:

LAN.IP.OF.SERVER joebuntu.gateway.2wire.net joebuntu

eg

192.168.0.3 joebuntu.gateway.2wire.net joebuntu

fragos 10-21-2008 05:50 PM

On a LAN you could address the server as "joebuntu.local".

billymayday 10-21-2008 05:52 PM

You need to put the entry in the client hosts files.


All times are GMT -5. The time now is 08:20 PM.