<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digitivity &#187; etc/hosts</title>
	<atom:link href="http://digitivity.org/tag/etchosts/feed" rel="self" type="application/rss+xml" />
	<link>http://digitivity.org</link>
	<description>The Digital Productivity Blog</description>
	<lastBuildDate>Sat, 24 Dec 2011 17:34:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to Manually Add Hosts in Windows, Linux, and OS/X</title>
		<link>http://digitivity.org/964/how-to-manually-add-etc-host-ip-address-in-windows-linux-and-osx</link>
		<comments>http://digitivity.org/964/how-to-manually-add-etc-host-ip-address-in-windows-linux-and-osx#comments</comments>
		<pubDate>Mon, 24 May 2010 17:50:53 +0000</pubDate>
		<dc:creator>Digitivity</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[etc/hosts]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[IP address]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS/X]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://digitivity.org/?p=964</guid>
		<description><![CDATA[<p>Posted in <a href="http://digitivity.org/category/how-to" title="HowTo">HowTo</a></p>Normally when you want to access a server on the Internet, you specify its name, like "www.google.com". What actually happens behind the scenes is that your computer finds out the "IP address" of where you want to go. The IP address is like the "telephone number" of a server. The IP address for Google is <a href="http://64.233.181.104/">64.233.181.104</a> .

Read on to find out how to set IP address manually.


Related posts:<ol><li><a href='http://digitivity.org/965/microsoft-finally-wants-you-to-ditch-ie6-upgrade-message' rel='bookmark' title='Permanent Link: Microsoft (Finally) Wants You to Ditch IE6'>Microsoft (Finally) Wants You to Ditch IE6</a></li>
<li><a href='http://digitivity.org/321/my-windows-xp-gets-virus-infected-conficker-mem-sasser' rel='bookmark' title='Permanent Link: My Windows XP Gets Virus Infected'>My Windows XP Gets Virus Infected</a></li>
<li><a href='http://digitivity.org/641/how-to-install-miro-podcast-viewer-on-windows' rel='bookmark' title='Permanent Link: How to Install Miro Podcast Viewer on Windows'>How to Install Miro Podcast Viewer on Windows</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Normally when you want to access a server on the Internet, you specify its name, like &#8220;www.google.com&#8221;. What actually happens behind the scenes is that your computer finds out the &#8220;IP address&#8221; of where you want to go. The IP address is like the &#8220;telephone number&#8221; of a server. The IP address for Google is <a href="http://64.233.181.104/">64.233.181.104</a> .</p>
<p>Go ahead and try it, you&#8217;ll end up at Google.</p>
<p>If the IP address is a &#8220;telephone number&#8221;, then the name (like the name you enter for a number in your cell phone) is called a host name. &#8220;Host&#8221; is just another word for server or computer.</p>
<p>Anyway, normally all of this works automagically, and you don&#8217;t even notice it. Once in a while it may not, for example, in a home network, thus forcing you to type in numbers instead of names.</p>
<p>There&#8217;s a way to set hostnames to IP addresses manually.</p>
<h3>The hosts file</h3>
<p>It&#8217;s called a &#8220;hosts&#8221; file, and it works generally the same on Windows, Linux/Unix, and Mac OS/X.</p>
<p>The hosts file is a list of IP addresses followed by hostnames, separated by a space, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">64.233.181.104 www.google.com
192.168.0.4 myhomecomputer</pre></div></div>

<p>By the way, there&#8217;s a neat little trick you can use to block ads by setting the address of adservers, like Double Click&#8217;s, to your local computer:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1 ad.doubleclick.net</pre></div></div>

<p>Note: 127.0.0.1 is a special address that always refers to your own computer.</p>
<p>The hosts file&#8217;s location differs from system to system:</p>
<h3>Setting hosts/IP address on Windows</h3>
<p>On Windows 95, 98, and ME, the host file is at <tt>c:\windows\hosts</tt> .</p>
<p>On Windows NT, 2000, XP, Vista, and 7, it&#8217;s at <tt>C:\windows\system32\drivers\etc\hosts</tt> .</p>
<p><a href="C:\windows\system32\drivers\etc\hosts">View your hosts file</a></p>
<p>You can modify it with Notepad (Accessories menu).</p>
<h3>Setting hosts/IP address on Mac OS/X</h3>
<p>In Mac OS X 10.2 or later, hosts is at <tt>/private/etc/hosts</tt></p>
<p>To edit it, type this into a <a href="http://macapper.com/2007/03/08/the-terminal-an-introduction/">terminal</a> (Applications > Utilities > Terminal)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span></pre></div></div>

<p>Enter your own password if prompted, add a hostname entry, then press Ctrl+x to exit the editor, and save the modified file by pressing &#8220;y&#8221;.</p>
<p>You have to then flush the DNS cache (OS/X doesn&#8217;t do that automatically):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> dscacheutil <span style="color: #660033;">-flushcache</span></pre></div></div>

<p>More info: <a href="http://support.apple.com/kb/TA27291">http://support.apple.com/kb/TA27291</a><br />
<a href="http://www.leftcolumn.net/2009/07/04/adding-an-entry-to-etchosts-on-os-x/">http://www.leftcolumn.net/2009/07/04/adding-an-entry-to-etchosts-on-os-x/</a></p>
<h3>Setting hosts/IP address on Linux/Ubuntu/Unix</h3>
<p>On Linux and all other Unixes, hosts is at<br />
<tt>/etc/hosts</tt> . </p>
<p><a href="/etc/hosts">View your hosts file</a></p>
<p>You have to have either sudo or root privileges to edit it.</p>


<p>Related posts:<ol><li><a href='http://digitivity.org/965/microsoft-finally-wants-you-to-ditch-ie6-upgrade-message' rel='bookmark' title='Permanent Link: Microsoft (Finally) Wants You to Ditch IE6'>Microsoft (Finally) Wants You to Ditch IE6</a></li>
<li><a href='http://digitivity.org/321/my-windows-xp-gets-virus-infected-conficker-mem-sasser' rel='bookmark' title='Permanent Link: My Windows XP Gets Virus Infected'>My Windows XP Gets Virus Infected</a></li>
<li><a href='http://digitivity.org/641/how-to-install-miro-podcast-viewer-on-windows' rel='bookmark' title='Permanent Link: How to Install Miro Podcast Viewer on Windows'>How to Install Miro Podcast Viewer on Windows</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://digitivity.org/964/how-to-manually-add-etc-host-ip-address-in-windows-linux-and-osx/feed</wfw:commentRss>
		<slash:comments>119</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: digitivity.org @ 2012-05-22 18:19:15 -->
