Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-29-2006, 08:54 PM   #1
LQ Newbie
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
Hostname confusion

I am a Linux newbie and I am having a bit of difficulty understanding the concept of hostname and how it relates to domain names etc. I understand that I will need to change the /etc/hosts file as well as /etc/sysconfig/network files. Where does localhost and localhost.localdomain fit into this as well.

I have a static ip address and will be hosting 2 sites on my server.

If I have and what should my hostname then be? I have also seen 'fully qualified domain name' (I think this was it) used. Can someone please explain this.

What should my entries for the /etc/hosts file be given my 2 domain names?

If someone could shed some light on the above it would be greatly appreciated. Or any direction to some good tutorials that explain things in layman's terms would be good as well.

Old 10-29-2006, 09:48 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Your hostname is irrelevant to the domain names you host thru apache or whatever http server you use.

All computers are named, this is the hostname to associate a name with the machine with. Think of it like this, would it be easier for you to remember the machine by a number or a name?

By default, most machines in *nix environments are named localhost and have a domain localdomain until you decide to name it how you like.

You don't need to add your two domains to your /etc/hosts, I'm sure you'll be setting up DNS with Bind or the like to resolve name resolution for such domains.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
confusion carl440 Linux - Newbie 4 04-20-2006 04:10 PM
g++ == confusion slantoflight Programming 4 02-20-2006 02:19 PM
WM Confusion phoeniXflame Slackware 3 02-16-2003 06:19 AM
Some confusion about RH 7.3 psyklops Linux - Distributions 2 05-08-2002 04:08 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 06:01 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration