Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hosts(5) [bsd man page]

HOSTS(5)							File Formats Manual							  HOSTS(5)

NAME
hosts - host name data base DESCRIPTION
The hosts file contains information regarding the known hosts on the network. For each host a single line should be present with the fol- lowing information: official host name Internet address aliases Items are separated by any number of blanks and/or tab characters. A ``#'' indicates the beginning of a comment; characters up to the end of the line are not interpreted by routines which search the file. When using the name server named(8), this file provides a backup when the name server is not running. For the name server, it is suggested that only a few addresses be included in this file. These include address for the local interfaces that ifconfig(8C) needs at boot time and a few machines on the local network. This file may be created from the official host data base maintained at the Network Information Control Center (NIC), though local changes may be required to bring it up to date regarding unofficial aliases and/or unknown hosts. As the data base maintained at NIC is incom- plete, use of the name server is recommend for sites on the DARPA Internet. Network addresses are specified in the conventional ``.'' notation using the inet_addr() routine from the Internet address manipulation library, inet(3N). Host names may contain any printable character other than a field delimiter, newline, or comment character. FILES
/etc/hosts SEE ALSO
gethostbyname(3N), ifconfig(8C), named(8) Name Server Operations Guide for BIND 4.2 Berkeley Distribution May 14, 1986 HOSTS(5)

Check Out this Related Man Page

HOSTS(5)						      BSD File Formats Manual							  HOSTS(5)

NAME
hosts -- host name data base DESCRIPTION
The hosts file contains information regarding the known hosts on the network. It can be used in conjunction with DNS, and the NIS maps `hosts.byaddr' and `hosts.byname', as controlled by nsswitch.conf(5). For each host a single line should be present with the following information: Internet address official host name aliases Items are separated by any number of blanks and/or tab characters. A ``#'' indicates the beginning of a comment; characters up to the end of the line are not interpreted by routines which search the file. This file provides a backup used when the name server is not running. For the name server, it is suggested that only a few addresses be included in this file. These include addresses for the local interfaces that ifconfig(8) needs at boot time and a few machines on the local network. This file may be created from the official host data base maintained at the Network Information Control Center (NIC), though local changes may be required to bring it up to date regarding unofficial aliases and/or unknown hosts. As the data base maintained at NIC is incomplete, use of the name server is recommended for sites on the DARPA Internet. Network addresses are specified in the conventional ``.'' (dot) notation using the inet_addr(3) routine from the Internet address manipula- tion library, inet(3). Host names may contain any printable character other than a field delimiter, newline, or comment character. FILES
/etc/hosts The hosts file resides in /etc. SEE ALSO
gethostbyname(3), nsswitch.conf(5), ifconfig(8) Name Server Operations Guide for BIND. HISTORY
The hosts file format appeared in 4.2BSD. BSD
December 25, 2013 BSD
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Network Ip

Hello again. Neo, thanks for your last reply. I have a new question. How can I re-configure the host name and IP address information attached to my NIC? I remember seeing a command posted here that would cause the system to re-boot and require the information to be entered but I do not see it... (6 Replies)
Discussion started by: jdevarie
6 Replies

2. IP Networking

set ip address

I'm new to Solaris. How do I set a server's IP address? Thanks in advance. (3 Replies)
Discussion started by: confused
3 Replies

3. Solaris

Changing IPs on E450

Hi, I'm working with an E450 server and it has one network card configured with 2 local and internet IP addresses. Presently, the local IP is set as the primary address while teh Internet IP is set as the secondary address. I wish to change this and make the local IP secondary and the... (2 Replies)
Discussion started by: Ronny
2 Replies

4. Solaris

Dual NIC problem

Hi, I have a problem with a server disconnecting from the network. This is a SUN box with dual NIC's running Solaris 8. We have a Nokia router that routes traffic but it's virtual address doesn't respond to pings. When the SUN box sends out a ping, if nothing comes back it will shut down... (5 Replies)
Discussion started by: m_smith
5 Replies

5. IP Networking

Binding Virtual IP address to NIC

Hi, I bound a virtual IP to a network card on my E450 server and I am getting this error when I reboot the server, saying, " retrying host, RPC time out. I had to break this sequence and allow other services to load. Of course they didn't load properly. Please how can I sort this out? I do need... (8 Replies)
Discussion started by: Ronny
8 Replies

6. UNIX for Dummies Questions & Answers

HOSTS File

Hi All, I am to the UNIX world and want to know if I can specify a range of IP addresses instead of having to include one by one on the HOSTS file. Can I just say 127.20.1.1 to 127.20.1.156 ? Or the only way is to put one by one along with the machine name next to the IP ? THANKS (4 Replies)
Discussion started by: cymerman
4 Replies

7. Shell Programming and Scripting

NIC address

how can I know the Network Interface Card physical address? (4 Replies)
Discussion started by: nokia1100
4 Replies

8. Solaris

Configure second NIC on Sun E450

I wanted to configure a second NIC card on a different IP on my Sun E450 server. Currently, I have hme0. when I ran the command : ifconfig hme1 <ip address> netmask <subnet mask> broadcast + up I got the following error message: ifconfig: SIOCGIFFLAGS: hme1: no such interface Any idea... (3 Replies)
Discussion started by: Remi
3 Replies

9. UNIX for Dummies Questions & Answers

Server NIC/network utilization

Hi, as topic. We have 2 NIC in the server. How can I check the utilization/network load for each individual NIC? using netstat seems not showing any percentage. Is there any command which is able to do so? Thx! (3 Replies)
Discussion started by: *Jess*
3 Replies

10. IP Networking

Dedicated Server Move

I just moved a dedicated server, which included moving to a new subnet, and new IP address. Now my server is not reconnecting - I've tried ifconfig, altering the etc/hosts file with the new ip address, with no luck. (5 Replies)
Discussion started by: esmerika
5 Replies

11. Shell Programming and Scripting

awk question - getting ip from ifconfig

Hi there, I have a script which loops through the physical interfaces of a box and populates a variable called $NIC with the interface name so if for example $NIC is equal to "e1000g0", I am trying to figure out some awk that will get the IP for that interface from ifconfig output lo0:... (9 Replies)
Discussion started by: rethink
9 Replies

12. Solaris

NIC in OK prompt

HI Friends Please answer my few douts 1, Tell me how to check the NIC & Ip address details in OK promt 2, How to check correpted memory using Vmstat command 3, HOw to chekc local usr in nIS 4, How to get the newely added NIC card name? Thanks Waiting for ur replies (3 Replies)
Discussion started by: suresh_krish555
3 Replies

13. UNIX for Dummies Questions & Answers

Difference between Mac and IP addresses

If a web search is done on this topic there are many links but no information included in the documents. So my questions are; Why does a NIC card have it's own permanent ID. Why can't it share the host name? An ID is an ID. Why does a computer need two ways to ID it. If the network... (3 Replies)
Discussion started by: theKbStockpiler
3 Replies

14. Shell Programming and Scripting

Adding a character

Hello experts. I trying to achieve 2 things here. I'm trying to convert all of the host names to lower case and add an "m" to each hostname. Can anyone provide some guidance on what I can do? Your input is greatly valued! Here are the desired results: 1. read the host name from a file. 2.... (8 Replies)
Discussion started by: david_tech
8 Replies

15. AIX

Howto find the data and management IP address

Can anyone help me to find the data and management IP address on a IBM unix server without looking at the /etc/hosts file. sometimes the hosts file may not make it obvious between the data & mgmt ip addresses. thanks (5 Replies)
Discussion started by: amerjit.jhalley
5 Replies