# How to add a static entry in the hosts file? 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 or domain names. This file acts as a local DNS service for your local machine and overrides the mappings from the DNS server to which your machine is connected over the network. The location of the hosts file depends on the operating system being used. The application will not start if the IP address cannot be retrieved from a locally installed server or if the IP address cannot be resolved by the DNS. ## Add a static entry to the etc\hosts file Follow the steps below based on your operating system. ### For Windows 1. Open your text editor in **Administrator mode**. 2. In the text editor, open: ``` C:\Windows\System32\drivers\etc\hosts ``` 3. Add the IP address and hostname. **Example:** ``` 171.10.10.5 opm.server.com ``` 4. Save the changes. ### For Linux 1. Open **Terminal**. 2. Use the nano command-line text editor (or another editor you have available) to open the hosts file. The command with nano is as follows (this will require your Linux user password): ``` sudo nano /etc/hosts ``` 3. Add the appropriate changes in the hosts file. **Example:** ``` 171.10.10.5 opm.server.com ``` 4. Use the **Control + X** key combination to save the changes. ## Related Products - [Network Monitoring](https://www.manageengine.com/network-monitoring/?relPrd) - [Bandwidth Monitoring & Traffic Analysis](https://www.manageengine.com/products/netflow/?relPrd) - [Network Configuration Management](https://www.manageengine.com/network-configuration-manager/?relPrd) - [Switch Port & IP Address Management](https://www.manageengine.com/products/oputils/?relPrd) - [Firewall Management](https://www.manageengine.com/products/firewall/?relPrd) - [Network Monitoring Software for MSPs](https://www.manageengine.com/network-monitoring-msp/?relPrd) - [IT Operations Management](https://www.manageengine.com/it-operations-management/) - [Application Performance Monitoring](https://www.manageengine.com/products/applications_manager/?relPrd)