Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hosts(5) [minix man page]

HOSTS(5)							File Formats Manual							  HOSTS(5)

hosts - hostname to IP address database SYNOPSIS
/etc/hosts DESCRIPTION
The hosts database lists the IP addresses and the hostnames that translate to these IP addresses. It is used by nonamed(8) in a network without name servers. A simple /etc/hosts may look like this: localhost darask burask The localhost entry lists a special address that refers to the local host itself (a kind of /dev/tty for hosts.) You should only list it if nonamed needs it! The other entries are actual machines. The file may contain comments marked with '#'. You can have aliases (more hostnames on the same line), but it is not recommended, because nonamed can't present them to the system as CNAME records. An often seen form like darask is harmless though, and has the small advantage that you can use the short name in /etc/ethers so rarpd can match it at boot time. FILES
/etc/hosts Hosts database. SEE ALSO
ethers(5), nonamed(8), rarpd(8), boot(8). AUTHOR
Kees J. Bot ( HOSTS(5)

Check Out this Related Man Page

RARPD(8)						      System Manager's Manual							  RARPD(8)

rarpd - reverse address resolution protocol daemon SYNOPSIS
rarpd [-d] DESCRIPTION
Rarpd listens on the ethernet for broadcast packets asking for reverse address resolution. These packets are sent by hosts at boot time to find out their IP address. Rarpd looks up the six octet ethernet number in the /etc/ethers file finding a host name. This name is trans- lated to the IP address of the host by a DNS lookup. The IP address is then sent to the host. Before rarpd can start its service it first finds out what the IP addresses of the ethernets are. It will look through /etc/ethers to map the ethernet addresses to host names. It then uses /etc/hosts to map the host names to IP addresses. If this lookup fails then several RARP requests are broadcasted in the hope that some RARP server knows the addresses. The IP addresses are eventually set in the same way as ifconfig(8). (The address is not changed if already set with ifconfig.) Note that the host names in the ethers and hosts files must match exactly. The DNS can not be used yet, so a simple name can't be translated to a fully qualified name. Rarpd exits after startup if there are no active ethernets, or if there is no ethers file. Warning! Sun diskless workstations assume that the first RARP server that answers is the host they are to boot from. For this to work all other Sun RARP servers delay their answer if they are not also the requestors boot server. The Minix rarpd does not have this kludge so it will happily engage the Sun boot server to see who can answer the client first. Unless your Minix host can actually serve a Sun diskless client, it is better not to list any more hosts in the ethers file than necessary. OPTIONS
-d Turns on debugging messages. Debugging can also be turned on at runtime by sending signal SIGUSR1 or turned off with SIGUSR2. SEE ALSO
ifconfig(8), ethers(5), hosts(5), set_net_default(8), boot(8), inetd(8), irdpd(8), nonamed(8). AUTHOR
Kees J. Bot ( RARPD(8)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

edit /etc/hosts to show mypc in who

have edit the /etc/hosts as belows mypc so when i do a who, i can see my "mypc" BUT after i changed, i cant see "mypc" do i have to restart anything? (6 Replies)
Discussion started by: yls177
6 Replies

2. Shell Programming and Scripting

txt file to oracle database

hiya, i have a query: i want to read a file which contains: 2005/02/21 16:56:54.301: 111 PS (200, 10) sent <log instrument="FXA.ROSS"... (9 Replies)
Discussion started by: jorhul
9 Replies

3. UNIX for Advanced & Expert Users

Copy a file to multiple hosts

Hi, I need to copy a file ( say 1MB file ) to multiple hosts( no of machines is huge). What would be the most optimal way of doing it with minimal user intervention ? Thanks, Sumit (5 Replies)
Discussion started by: sumsriva
5 Replies

4. HP-UX

Assigning IP's

hi all, i want to know where i can add and IP address so when i do a "w", i can see what IP is assigned to which tty? i know in tru64 you just added an entry to /etc/hosts. this does not seem to be the case with hpux. thanks (12 Replies)
Discussion started by: macgre_r
12 Replies

5. Shell Programming and Scripting

How to merge and add?? Two Files

Sorry noob here...... I have 2 files like this: File A 8080000001 400 8080000002 300 8080000003 200 File B 8080000001 600 8080000002 200 8080000004 200 I want one file where File OUT 8080000001 1000 (6 Replies)
Discussion started by: Unice
6 Replies

6. UNIX for Advanced & Expert Users

/etc/hosts on Ubuntu behaving strangely

Hy guys, I'm having a very strange problem, every time I change the /etc/hosts file on an Ubuntu machine @ work, every time I change the line: programmer.COMPANY to programmer.COMPANY programmer It works till the next reboot, now, I have never experienced this on... (5 Replies)
Discussion started by: Zarnick
5 Replies

7. Shell Programming and Scripting

Change $HOST in /etc/hosts

I want to change the following lines in /etc/hosts on FreeBSD: ::1 localhost localhost into the following lines ::1 localhost localhost I have the following script to do... (5 Replies)
Discussion started by: figaro
5 Replies

8. Shell Programming and Scripting

Strange exit of while loop

This code is used to check for duplicate ip and hostnames in an /etc/hosts file CENTRAL is path to /etc/hosts AWK =awk #check CENTRAL for duplicate ips or hostnames# grep -v "^#" $CENTRAL | $AWK '{ print $1, $2; }' | \ while read ip hostname do if... (5 Replies)
Discussion started by: trimike
5 Replies

9. UNIX for Dummies Questions & Answers

Grep that I should know but I can't remember!

I have a master list of hosts, and a list of bad hosts. I want to filter out the bad hosts from the master list. I was trying a few for loops but it's not providing the desired result: for i in $(cat master_host_list);do grep -iv $i bad_host_list;done | sort | uniq # won't work because it... (5 Replies)
Discussion started by: MaindotC
5 Replies

10. Shell Programming and Scripting

Left Align of Text File

Input: hiddenhausen 99.60 y 1.05 2.50 -550 -110 1:25:200 herbstein 99.021 n 1.05 2.50 -550 -110 1:25:200 bangalore 98.82 y 1.05 2.50 -550 -110 1:25:200 golm 98.8 y 1.05 2.50 -550 -110 1:25:200 para 98.82 n 1.05 2.50 -550 -110 1:25:200 bogen 98.61 n 1.05 2.50 -550 -110 1:25:200 saintandre... (5 Replies)
Discussion started by: asavaliya
5 Replies

11. 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

12. Shell Programming and Scripting

Bash script to detect nonpingable hosts

I have a script to detect if a host is pingable or not. The problem is that I would like it to put the nonpingable hosts in one file and the pingable hosts in another. I have come up with this so far: for ip in `cat /tmp/testlist2`; do ping -c 3 $ip >/dev/null && echo "$ip is up" || echo "$ip... (5 Replies)
Discussion started by: newbie2010
5 Replies

13. IP Networking

Help with to check the tcp network connectivity between servers and hosts

ello, i am new to the networking side. I have a requirement to check the tcp network connectivity between server it's running on and the list of host's and ports combination. please help me where i am going wrong. my code: #!/bin/bash #read the file line by line cd "$1" cat... (17 Replies)
Discussion started by: sknovice
17 Replies

14. 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

15. What is on Your Mind?

Telegram Bots - Bot Code Examples

I'm currently looking into ways to integrate the Telegram API into the forums: Telegram Bots - Bot Code Examples I'm thinking, first off, to use the Telegram API to get forum alerts and notifications (to Bot or Not?). Second, I thinking of ways to more deeply integrate Telegram into the... (5 Replies)
Discussion started by: Neo
5 Replies