Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

domain name setup

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
sprucio
Posts: 143
Joined: 2005-03-29 03:30

domain name setup

#1 Post by sprucio »

How do you setup a the domain name in Debian? It looks like Debian has a file called /etc/hostname but there is no /etc/domainname.

User avatar
sensovision
Posts: 113
Joined: 2004-11-15 11:38
Location: Ukraine
Contact:

#2 Post by sensovision »

hi sprucio! I'm not sure if I understand you questions correctly but if you just wish to change domain name for your PC(internally, if you'd like this name to be known for other PCs you need to setup it in DNS records of DNS server of your network) here is what you should do. you need to put it into /etc/hostname
and later edit this file /etc/hosts like this:
127.0.0.1 localhost.localdomain localhost yournewdomainname
192.168.1.95 yournewdomainname

BTW 192.168.1.95 is IP address of your PC in network.

hope this would help
Denis

sprucio
Posts: 143
Joined: 2005-03-29 03:30

#3 Post by sprucio »

Well, the domain name is really anything after the first dot so if I have a name like:

pine.tree.org

The host name is pine and the domain name is tree.org.

During installation, the Debian installer will ask for a domain name. Where does this go?

Some distributions have an /etc/domainname file containing just the domain name. Editing the /etc/hosts file is a work around but not necessarily the way it's done. Then again, maybe this is the only way to do it in Debian.

User avatar
sensovision
Posts: 113
Joined: 2004-11-15 11:38
Location: Ukraine
Contact:

#4 Post by sensovision »

if host file doesn't suit you for some reason, you could run base-config. this would bring you configurator you were talking about.
There is also Network tools in Gnome which would let you to configure each interface and I think host as well in GUI manner.
Denis

sprucio
Posts: 143
Joined: 2005-03-29 03:30

#5 Post by sprucio »

As I've described before, the Debian installer asks for a domain name during install. Do you know where this information is utilized?

User avatar
sensovision
Posts: 113
Joined: 2004-11-15 11:38
Location: Ukraine
Contact:

#6 Post by sensovision »

sorry, I thought you've asked about installer itself not about where it's used.
As for use it's go in the files mentioned before:
/etc/hosts
/etc/hostname
/etc/networks
/etc/network/interfaces
Sorry if this is not info you're looking for. Maybe someone else would be able to give you an answer.
Denis

Guest

#7 Post by Guest »

Thanks for the help.

Does anyone else care to comment?

Guest

#8 Post by Guest »

Debian uses the hostname and domainname in /etc/hosts. When the installer asks for it, it's to set it here and possibly to set the "search domainname" in /etc/resolv.conf. Executing "hostname -fqdn" will show you your hostname and domainname. /etc/domainname is normally used to set the nis domainname which may not be the same as the dns domainname.
Some distributions have an /etc/domainname file containing just the domain name.
Gentoo right?

sprucio
Posts: 143
Joined: 2005-03-29 03:30

#9 Post by sprucio »

Gentoo, yes. One of my friends religiously uses it.

The reason why I'm being so picky about this is because during installation, I actually give a bogus domain name like "linux.bogus." Still, when I run commands like dnsdomainname, I get localdomain as a result.

What IS the standard way to setup the domain name in Linux?

Post Reply