You are not logged in.
Pages: 1
What is host name:
I found that there is a relationship btw /etc/rc.conf and /etc/hosts
I am not getting
My etc/rc.conf looks like this
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="dhcp"
INTERFACES=(eth0)
and my /etc/hosts looks like this
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain myhost
# End of file
Can any one help me to understand why one has to see that the host name in both the files should be same. And I have seen some one using
HOSTNAME="mybox.mydomain.com"
my to use such host name what are the advantages. What if I just use "ABCD" instead of "mybox.mydomain.com"
Offline
Your /etc/hosts should be looking like:
127.0.0.1 localhost.localdomain localhost myhost
"I'm Winston Wolfe. I solve problems."
~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~
Offline
Your host-name appears on router user lists and appears in the terminal. Also if you use a web server, you can use the host-name opposed to localhost in the web browser.
There is a difference between bleeding [edge] and haemorrhaging. - Allan
Offline
The only place I ever see it is in rtorrent's title bar.
Offline
Your hostname is a unique identifying name for your computer that is used in many, many different places.
The /etc/hosts file is a 'local' version of DNS which allows you to override normal DNS lookups by putting hostname/ip address pairs in the file.
Last edited by fukawi2 (2009-07-16 22:32:47)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
thank you for your information
Offline
Pages: 1