How to Edit your Hosts File in Linux
The hosts file is a text file in Linux that maps hostnames with IP addresses. It has priority over the DNS resolution, so it can be used for testing applications, development, and blocking websites. There is also a hosts file in other Operating Systems, such as Windows and MacOS. However, this tutorial will show how to edit your hosts file in Linux.
|
|
Usually, when migrating your application, you can edit the hosts to check if your application is working correctly without making any DNS changes. This overrides DNS entries to test your website or application without making the DNS changes. You can also use the hosts file to add the website you want to block by mapping the domains or subdomains to the localhost IP address 127.0.0.1. Let’s say you have a local website or a device on your network that you want to access without having to remember the IP address. You can add the aliases in the hosts file at /etc/hosts to access them using a domain. Full Story |
This topic does not have any threads posted yet!
You cannot post until you login.