October 10, 2014

How to make an entry of host file in Unix

Below is the procedure to make an entry of host file in Unix

  • Open host file: /etc/hosts
  • Make an entry to the file like below
           <ip> <hostname>
           Ex:
             10.143.121.118  myhostname
  • Save the file
  • And run below command to flush the DNS cache
           dscacheutil -flushcache