The plain-text of the hosts file is identical regardless of the operating system on which it is used.
We will discuss how this can be used both for beneficial and malicious purposes later in the article. This means that entries in the hosts file will negate any DNS lookup for the named hosts. The IP lookup sequence described above indicates that the hosts file has precedence when determining a host’s address. The request will fail if the name cannot be found via the DNS server. If the requested name is not in the local host file, the next step is to attempt to resolve the address using a Domain Name Service (DNS) server. When your machine needs to look up an IP address it will first search the hosts file. It basically serves as a database of domain names which your operating system employs to identify and locate hosts on an IP network. The hosts file is a text file that is comprised of a list of host names and their corresponding IP addresses.
MAC OS LIST DNS SERVERS HOW TO
We will show you how to edit this file and run through some scenarios that may necessitate making changes that impact network activity.
In this article, we will look closely at this important file that is a critical component which allows your computer to access a network or the Internet. There are, however, some files that you may need to access and even edit in order to modify your computer or recover from a virus or malware attack.
The majority of these files will never be directly accessed by the average Mac user and will be called upon by the OS to perform their designated task when required to do so. There are literally many thousands of files that provide the functionality of the macOS.