# For Windows :
# Open your text editor in Administrator mode.
# In the text editor, open C:\Windows\System32\drivers\etc\hosts.
# Add the IP Address and hostname.
#Example:
171.10.10.5 opm.server.com
# Save the changes.
# For Linux :
# Open terminal.
# Use the nano command line text editor or a different one you have available to open the hosts file. The command with nano is as follows (the command will require your Linux user password)
sudo nano /etc/hosts
# Add the appropriate changes in the hosts file.
# Example:
171.10.10.5 opm.server.com
# Use the Control and 'X' key combination to save the changes.
The hosts file (also referred to as etc\hosts) is a text file used by operating systems including windows to map IP addresses to host names/domain names. This file acts as a local DNS service for your local machine and it overrides the mappings from the DNS server to which your machine is connected over the network.
https://www.manageengine.com/network-monitoring/how-to/how-to-add-static-entry.html
Before the advent of DNS, the host table was the only way of resolving hostnames on the fledgling Internet.
https://manpages.ubuntu.com/manpages/trusty/man5/hosts.5.html