Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-28-2006, 04:31 PM   #1
LQ Newbie
Registered: Oct 2003
Posts: 6

Rep: Reputation: 0
setup domains in /etc/hosts

I have a new dedicated server. In the file /etc/hosts

Should I set to

Code:   localhost.localdomain  localhost

Code:          localhost.localdomain   localhost
Old 07-28-2006, 05:19 PM   #2
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
What you're doing in /etc/hosts is adding the name and address of other systems that this system can get to by name (with ssh and the like). You do not want to add anything to the localhost line (never ever, just leave it be). So, if your other system is named, your hosts file would look like this: localhost
123.456.789.1 foo

That way you can refer to as simply foo; e.g., ssh foo, or with the full name, ssh


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sub Domains & Virtual Hosts oO_SwooP_Oo Linux - General 11 09-21-2005 02:07 PM
webalizer setup for virtual hosts intranet_man Linux - Security 1 03-03-2005 12:00 PM
Hosts / domains / IPs / Vhosts Belize Linux - Networking 1 08-22-2003 01:20 AM
setup multi domains email in postfix importboy03 Linux - Software 1 04-29-2003 04:06 PM
PostFix multipe domains (virtual setup) dulaus Linux - Networking 0 10-10-2002 04:58 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:27 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