How To Change Set Hostname In Linux Debian Setting Host Name Domain
how to change set hostname in linux debian setting host name domain
how, to, change, set, hostname, in, linux, debian, setting, host, name, domain
How To Change Set Hostname In Linux Debian Setting Host Name Domain
Post Description: how to change set hostname in linux debian setting host name domain
POST# 1009
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: How To Change Set Hostname In Linux Debian Setting Host Name Domain
to setup the hostname in debian use these steps

for example i will be using ns1.domain.com as my hostname and domain with ip of 192.168.0.101

firs step to do is to edit /etc/hosts
nano /etc/hosts

it will look something like this:
127.0.0.1 localhost.localdomain localhost ns1

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


now change it to look like this:
127.0.0.1 localhost.localdomain localhost ns1
192.168.0.101 ns1.domain.com ns1

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


I basically added this second line: 192.168.0.101 ns1.domain.com ns1

after you have made the changes send these two commands:

Command:
echo ns1.domain.com > /etc/hostname


Command:
/bin/hostname -F /etc/hostname


if you just needed to setup your hostname stop here.



if you are continuing my tutorial, you can install your ssh now.
apt-get -f install

* i say yes to all the default prompts

once all the updates are completed:
apt-get install ssh




if you are following this Debian tutorial on install. go to the next step:
Next Step: Install BIND9



No Repies
(0) Comments for How To Change Set Hostname In Linux Debian Setting Host Name Domain

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload