I am missing my hosts
file in Windows 8.1. I couldn't find it in C:\Windows\System32\drivers\etc
.
Here is what I see in that location: hosts.ics
, hosts.old
, lmhosts.sam
, networks
, protocol
and services
.
How can I fix it?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI am missing my hosts
file in Windows 8.1. I couldn't find it in C:\Windows\System32\drivers\etc
.
Here is what I see in that location: hosts.ics
, hosts.old
, lmhosts.sam
, networks
, protocol
and services
.
How can I fix it?
The default hosts
file contains only comments and is not needed for normal system operation:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
(Lines starting #
are comments in a hosts
file.)
If the file's not present, an event will be logged on startup in the Windows event log, but it won't stop anything working.
You can simply create a new, empty text file called hosts
(see Editing hosts file on Windows 8), and if you want to add your own custom entries, just and add them to it (as shown in the example comments in the default hosts
file, but without the #
at the start of the line).
hosts
file is used for normal system operations, maybe you were thinking of hosts.sam
in older versions of Windows.
Jun 21, 2015 at 10:39
hosts.ics
an d renamed hosts
to hosts.old
for a reason. I think you should not have both hosts.ics
and hosts
at the same time
Jun 21, 2015 at 12:08
hosts.ics
is used when not using Internet Connection Sharing, @Peter? (See my comment to your answer.) What do the comments in that file say? I'm very much tempted to think you're wrong here, and Reg Edit is right: one can just create that hosts
file if one needs it, and no need to worry if it's not there.
You have a hosts.ics
file which if such file exists is used instead of the traditional hosts
file.
You can verify this by adding a new entry to hosts.ics
say
127.0.0.1 my.test.local
and then ping my.test.local