[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to change hostname



On Fri, 20 May 2005 10:00:19 +0200, Urs Thuermann wrote:

> What is the debain way to change to hostname of a system.

Run "hostname NEWHOSTNAME" and put NEWHOSTNAME into /etc/hostname.  If
occurrences of OLDHOSTNAME appear in /etc/hosts, change them to
NEWHOSTNAME.

The mailname serves a different purpose from that of hostname but in many
cases their values are the same; so you might want to edit /etc/mailname
and restart your mail transport agent.

Here are the settings for my laptop, named "thanatos".

jdthood@thanatos:~$ hostname
thanatos
jdthood@thanatos:~$ cat /etc/hostname
thanatos
jdthood@thanatos:~$ cat /etc/mailname
localhost
jdthood@thanatos:~$ head -3 /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.1.1 thanatos

-- 
Thomas



Reply to: