Unix Socket - Network Host Names


Advertisements

Host names in terms of numbers are difficult to remember and hence they are termed by ordinary names such as Takshila or Nalanda. We write software applications to find out the dotted IP address corresponding to a given name.

The process of finding out dotted IP address based on the given alphanumeric host name is known as hostname resolution.

A hostname resolution is done by special software residing on high-capacity systems. These systems are called Domain Name Systems (DNS), which keep the mapping of IP addresses and the corresponding ordinary names.

The /etc/hosts File

The correspondence between host names and IP addresses is maintained in a file called hosts. On most of the systems, this file is found in /etc directory.

Entries in this file look like the following −

# This represents a comments in /etc/hosts file.
127.0.0.1       localhost
192.217.44.207  nalanda metro
153.110.31.18   netserve
153.110.31.19   mainserver centeral
153.110.31.20   samsonite
64.202.167.10   ns3.secureserver.net
64.202.167.97   ns4.secureserver.net
66.249.89.104   www.google.com
68.178.157.132  services.amrood.com

Note that more than one name may be associated with a given IP address. This file is used while converting from IP address to host name and vice versa.

You would not have access to edit this file, so if you want to put any host name along with IP address, then you would need to have root permission.

Useful Video Courses


Video

Fundamentals of Unix and Linux System Administration

Best Seller

129 Lectures 23 hours

Eduonix Learning Solutions

Video

Essentials of Unix Operating System

5 Lectures 4.5 hours

Frahaan Hussain

Video

Unix Command Course for Beginners

35 Lectures 2 hours

Pradeep D

Video

Linux/Unix For DevOps and Developers

41 Lectures 2.5 hours

Musab Zayadneh

Video

Linux, Unix OS Command Line and Shell Scripting Introduction

46 Lectures 4 hours

GUHARAJANM

Video

Unix and Linux Training

6 Lectures 4 hours

Uplatz

Advertisements