![Mac Mac](/uploads/1/2/6/6/126610758/871120757.png)
The computer filehosts is an operating system file that maps hostnames to IP addresses. It is a plain text file. Originally a file named HOSTS.TXT was manually maintained and made available via file sharing by Stanford Research Institute for the ARPANET membership, containing the hostnames and address of hosts as contributed for inclusion by member organizations. The Domain Name System, first described in 1983 and implemented in 1984,[1] automated the publication process and provided instantaneous and dynamic hostname resolution in the rapidly growing network. In modern operating systems, the hosts file remains an alternative name resolution mechanism, configurable often as part of facilities such as the Name Service Switch as either the primary method or as a fallback method.
- It was very very helpful, I changed my host file to something else with out keeping the original backup so that I will be able to install an application. But then, the application couldn't be installed and I lost my original host file content.
- Read reviews, compare customer ratings, see screenshots, and learn more about Helm - Hosts file manager. Download Helm - Hosts file manager for macOS 10.10 or later and enjoy it on your Mac. Helm is a simple hosts file manager.
- Of course, you would have ideally created a backup copy of the original but in the event that you didn’t, here’s how to reset/restore the hosts file in Mac/Windows. Restoring your hosts file is slightly different for Mac and Windows.
Original /etc/hosts file should look like this: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Host file free download - Host File Checker, L2Hosts Host file tweaker, BarevTM Host File Editor, and many more programs. Best Video Software for the Mac How To Run MacOS High Sierra.
Purpose[edit]
The hosts file is one of several system facilities that assists in addressing network nodes in a computer network. It is a common part of an operating system's Internet Protocol (IP) implementation, and serves the function of translating human-friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.
In some operating systems, the contents of the hosts file is used preferentially to other name resolution methods, such as the Domain Name System (DNS), but many systems implement name service switches, e.g., nsswitch.conf for Linux and Unix, to provide customization. Unlike remote DNS resolvers, the hosts file is under the direct control of the local computer's administrator.[2]
File content[edit]
The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each field is separated by white space – tabs are often preferred for historical reasons, but spaces are also used. Comment lines may be included; they are indicated by an octothorpe (#) in the first position of such lines. Entirely blank lines in the file are ignored. For example, a typical hosts file may contain the following:
This example only contains entries for the loopback addresses of the system and their host names, a typical default content of the hosts file. The example illustrates that an IP address may have multiple host names (localhost and loopback), and that a host name may be mapped to both IPv4 and IPv6 IP addresses, as shown on the first and second lines respectively.
Location in the file system[edit]
The location of the hosts file in the file system hierarchy varies by operating system. It is usually named hosts Mac miller completely transparent mp3 download. , without an extension.
Operating System | Version(s) | Location |
---|---|---|
Unix, Unix-like, POSIX | /etc/hosts[3] | |
Microsoft Windows | 3.1 | %WinDir%HOSTS |
95, 98, ME | %WinDir%hosts[4] | |
NT, 2000, XP,[5]2003, Vista, 2008, 7, 2012, 8, 10 | %SystemRoot%System32driversetchosts[6] | |
Windows Mobile, Windows Phone | Registry key under HKEY_LOCAL_MACHINECommTcpipHosts | |
Apple Macintosh | 9 and earlier | Preferences or System folder |
Mac OS X 10.0–10.1.5[7] | (Added through NetInfo or niload) | |
Mac OS X 10.2 and newer | /etc/hosts (a symbolic link to /private/etc/hosts)[7] | |
Novell NetWare | SYS:etchosts | |
OS/2 & eComStation | 'bootdrive':mptnetc | |
Symbian | Symbian OS 6.1–9.0 | C:systemdatahosts |
Symbian OS 9.1+ | C:private10000882hosts | |
MorphOS | NetStack | ENVARC:sys/net/hosts |
AmigaOS | < 4 | AmiTCP:db/hosts |
4 | DEVS:Internet/hosts | |
AROS | ENVARC:AROSTCP/db/hosts | |
Android | /etc/hosts (a symbolic link to /system/etc/hosts) | |
iOS | iOS 2.0 and newer | /etc/hosts (a symbolic link to /private/etc/hosts) |
TOPS-20 | <SYSTEM>HOSTS.TXT | |
Plan 9 | /lib/ndb/hosts | |
BeOS | /boot/beos/etc/hosts[8] | |
Haiku | /system/settings/network/hosts[9] | |
OpenVMS | UCX | UCX$HOST |
TCPware | TCPIP$HOST | |
RISC OS | 3.7, 5 | !Boot.Resources.!Internet.files.Hosts |
later boot sequence | !Boot.Choices.Hardware.Disabled.Internet.Files.Hosts[10] |
History[edit]
The ARPANET, the predecessor of the Internet, had no distributed host name database. Each network node maintained its own map of the network nodes as needed and assigned them names that were memorable to the users of the system. There was no method for ensuring that all references to a given node in a network were using the same name, nor was there a way to read the hosts file of another computer to automatically obtain a copy.
The small size of the ARPANET kept the administrative overhead small to maintain an accurate hosts file. Network nodes typically had one address and could have many names. As local area TCP/IP computer networks gained popularity, however, the maintenance of hosts files became a larger burden on system administrators as networks and network nodes were being added to the system with increasing frequency.
Standardization efforts, such as the format specification of the file HOSTS.TXT Magellan ma gps 4250 manual download. in RFC 952, and distribution protocols, e.g., the hostname server described in RFC 953, helped with these problems, but the centralized and monolithic nature of hosts files eventually necessitated the creation of the distributed Domain Name System (DNS).
On some old systems a file named networks is present that has similar to hosts file functions containing names of networks.
Extended applications[edit]
In its function of resolving host names, the hosts file may be used to define any hostname or domain name for use in the local system.
- Redirecting local domains
- Some web service and intranet developers and administrators define locally defined domains in a LAN for various purposes, such as accessing the company's internal resources or to test local websites in development.[11]
- Internet resource blocking
- Entries in the hosts file may be used to block online advertising, or the domains of known malicious resources and servers that contain spyware, adware, and other malware. This may be achieved by adding entries for those sites to redirect requests to another address that does not exist or to a harmless destination such as the local machine.[12] Commercial software applications may be used to populate the hosts file with entries of known undesirable Internet resources automatically. In addition, user-created hosts files which block nuisance servers are publicly available.[13][14]
- Fravia described these files variously as 'scrolls', 'precious', and 'powerful' in his anti-advertisement pages, where this usage of hosts was first published.[14]
- Software piracy
- Some pirated versions of software rely on a modified hosts file to prevent software from contacting the activation servers of the publisher, although activation servers sometimes appear in general purpose hosts files.[13]
Security issues[edit]
The hosts file may present an attack vector for malicious software. The file may be modified, for example, by adware, computer viruses, or trojan horse software to redirect traffic from the intended destination to sites hosting malicious or unwanted content.[15] The widespread computer wormMydoom.B blocked users from visiting sites about computer security and antivirus software and also affected access from the compromised computer to the Microsoft Windows Update website.In some cases malware has modified the library responsible for loading the hosts file in order to redirect it to a file it is able to control freely.[16]
See also[edit]
- DNSBL, a DNS-based blackhole list
References[edit]
- ^Internet Systems Consortium. 'The Most Widely Used Name Server Software: BIND'. History of BIND. Retrieved 2017-07-01.
- ^'Cisco Networking Academy Program: First-Year Companion Guide', Cisco Systems, Inc., 2002 (2nd Edition), page 676, ISBN1-58713-025-4
- ^'Linux Network Administrators Guide: Writing hosts and networks files'. Retrieved May 16, 2010.
- ^'Hosts File'. Retrieved August 10, 2011.
- ^'Microsoft KB Q314053: TCP/IP and NBT configuration parameters for Windows XP'. Retrieved August 28, 2010.
- ^'Microsoft KB 972034 Revision 2.0: default hosts files'. Retrieved August 28, 2010.
- ^ ab'Mac OS X: How to Add Hosts to Local Hosts File'. Retrieved August 28, 2010.
- ^'The Haiku/BeOS Tip Server'. Archived from the original on January 28, 2013. Retrieved November 30, 2012.
- ^'Haiku UserGuide:Network'. Retrieved January 17, 2019.
- ^RISC OS 6.14
- ^'Building / Testing via the Hosts File'. Ohio State University Web Hosting. OCIO. Retrieved 5 August 2018.
- ^Gordon, -Tx. 'Gordon and -Tx explanations about the use of Gordon's hosts file'. Web Searchlores. +Fravia. Retrieved 5 August 2018.CS1 maint: uses authors parameter (link)
- ^ abHofstetter, Constantin. '/etc/hosts to block shock sites etc'. Github. Retrieved 5 August 2018.
- ^ abVianello, Francesco 'Fravia'. 'Antiadvertisement Lab'. Web Searchlores. +Fravia. Retrieved 5 August 2018.
- ^'Remove Trojan.Qhosts – Symantec'. Retrieved May 16, 2010.
- ^Arntz, Pieter. 'Hosts file hijacks'. Malwarebytes Labs. Retrieved 5 August 2018.
External links[edit]
- Windows
- Mac
- Linux
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Hosts_(file)&oldid=941529306'
Source: iMore
If you're setting up a new webserver or another device that's going to be connected to the internet and you want to put it through its paces before it's live, or if you're having trouble with spyware and adware networks, there's an invisible file on your Mac that can help. It's called the Hosts file, and this is how to use it. https://high-powerllc362.weebly.com/java-for-mac-106-update-8-download.html.
The Domain Name System
When you type in the domain name of a web site you want to visit there's a lot happening behind the scenes. Every web site, every service, almost every device connected to the Internet has a unique numeric address that tells all the other devices where it is — its TCP/IP address. The Domain Name System (DNS) translates those numeric addresses into something a bit more recognizable and memorable to humans, like, 'www.imore.com' for example.
The first time you type in a web address, your Mac pings a DNS server — typically one automatically configured for you by your Internet Service Provider — to find out the TCP/IP address of the server you're trying to connect to. Your Mac builds up a hidden cache file to remember those details later on when you visit the same site again.
The Hosts file
The Domain Name System and its associated cache is your Mac's standard way of knowing how to get to where it's going on the Internet, but there's another file that can be very useful. It's called the Hosts file, and it can be used to override the default DNS information.
![Download Original Host File For Mac Download Original Host File For Mac](/uploads/1/2/6/6/126610758/954895618.png)
There are some practical reasons why you'd want to use the Hosts file instead of just letting DNS do its thing. Let's say you're testing a development server you're about to deploy, and you'd like to use its domain name instead of the machine's specific IP address. Before the system's online and accessible to anyone using DNS, you can use the Host file instead: Enter the machine's IP address and when you use that domain name, your Mac will go to that device instead.
You can also use the Hosts file to block or work around spyware and ad networks by 'zeroing out' their IP addresses - putting in 0.0.0.0 then the name of the domain you'd like to block.
How to edit the Hosts file
You'll need to know the IP address of the device you'd like to send your Mac to, or the domain names you're trying to keep your Mac away from. The best way to work with the Host file is by using the Terminal application found in your Mac's Utilities folder. You can search for Terminal using Spotlight or by selecting it in Finder.
- Open a Finder window.
- Select Applications from the sidebar.Source: iMore
- Double-click on Utilities.
- Double-click Terminal.Source: iMore
In the Terminal window, you will need to enter a command to open the Nano text editor. You will need your administrator password, as well.
- type sudo nano /etc/hosts and then hit return.
- Enter your administrator password and then hit return.Source: iMore
You're now in the Nano text editor. You should see something that looks like this:
If you want to add a new device or domain, move the cursor using the arrow keys and position it after the text in the window. Then, begin typing.
If you're mapping a particular IP address on your local network to a domain, you can type the IP address, hit tab, then type the domain name.
Conversely, if you'd like to make sure a web URL doesn't go to its intended site — if you're trying to keep your Mac away Adobe 3d rendering software. from certain sites, use '127.0.0.1.' That'll map it back to your Mac. Even if your Mac is assigned a different IP address by its router, 127.0.0.1 defaults to the local machine thanks to the default settings in that hose file.
Once you're done, hold down the control and O keys to save the file, then control and X to exit.
One last step
Back at the command line, type sudo killall -HUP mDNSResponder then type return. That will flush your Mac's DNS cache, so it doesn't get confused by any changes you've made to the Hosts file.
Don't forget you've modified the Hosts file, because at some point you may need to undo the changes you've made in order to keep your Mac working right.
How to reset your Mac's Hosts file
When you're ready to undo your changes and restore where your Mac's Hosts file routes to, you can do so by replacing the current host file with a new set of terms. You don't need Terminal for this reset.
- Make sure Finder is selected on your Mac.
- Click on Go in the Mac menu bar.
- Click on Go to Folder.
- Enter /private/etc/hosts into the search field.
- Click Go.
- Drag the Hosts file from the Finder window onto your desktop.
- Open the Hosts file from your desktop. It should open to TextEdit by default.
- Delete the content of the Hosts file.
- Paste the following into the same file:
- Click Save.
- Drag this same Hosts file from your desktop back into the same folder. If you don't have the folder open in finder anymore, follow steps one through five to reopen it.
- Click Replace when asked whether you want to replace the file.
- Enter your Administrative password when prompted (that's the password used by the main user to unlock their Mac).
- Restart your Mac.
Have any questions? Let me know.
Updated February 2020: Updated for macOS Catalina.
macOS Catalina
Main
shutdownCoronavirus forces shut down of Today At Apple sessions in US and Canada
Ifile For Mac
Apple has been forced to suspend all of its Today At Apple sessions throughout the U.S. and Canada because of the coronavirus pandemic.