LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   entry in /etc/hosts file for localhost localhost.localdomain (https://www.linuxquestions.org/questions/linux-newbie-8/entry-in-etc-hosts-file-for-localhost-localhost-localdomain-928415/)

sureshpanchanathan 02-08-2012 11:12 PM

entry in /etc/hosts file for localhost localhost.localdomain
 
Hi All,

I need your valuable advise. I am trying to install Oracle 11g on Oracle Linux 6.2. While I was going through an article on installing 11g, I came across the following lines:

Make sure that there is an entry in /etc/hosts file for your machine like this:

[IP-address] [fully-qualified-machine-name] [machine-name]


/*
Where "fully-qualified-machine-name" is your
"machine_name"."domain_name"
*/


when I opened the /etc/hosts file following entry was there:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain

Is the above entry currently on /etc/hosts is correct? If not then I would like to understand what I should enter on the file /etc/hosts? How I can find what is the localhost localhost.localdomin details.

Thanks
Suresh Panchanathan

eeekster 02-08-2012 11:15 PM

The entry you show is for localhost. What you need is the real name of your machine and the domain that name exists it.

chrism01 02-09-2012 05:52 AM

Every machine has an entry for itself to talk to itself.
You've got 1 entry there for IPv4 and one for IPv6; all perfectly normal.

sureshpanchanathan 02-09-2012 06:40 PM

HI,

As I am new to Linux I am learning through this machine. So can I modify as follows:

127.0.0.1 localhost.localdomain

instead of

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

is this is okay?

Thanks

Suresh Panchanathan

chrism01 02-09-2012 07:24 PM

No, if that's what the install setup, leave it alone ...

eeekster 02-09-2012 08:07 PM

Quote:

Originally Posted by chrism01 (Post 4598531)
No, if that's what the install setup, leave it alone ...

There's nothing wrong with adding entries to /etc/hosts. That's what it's there for. But leave the localhost lines.

frankbell 02-09-2012 08:10 PM

Here's from my hosts:

Quote:

127.0.0.1 localhost
127.0.1.1 tuna.[localdomain].org tuna.[localdomain].org
For some fool reason, I name all my computers after sea creatures.


All times are GMT -5. The time now is 03:39 PM.