HomeHow to?How to Edit Host File?

How to Edit Host File? [Windows/Linux/Mac]

How to Edit Host File in Windows, Linux and Mac? The computer file hosts 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, 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.

How to Edit Host File in Windows?

There are two methods to edit host file in Windows, as listed below.

Method #1: Using Hosts File Editor (Simple)

Seamlessly edit host files, create backups for easy retrieval or create entirely new ones using this simple and straightforward tool. Whether you have been the victim of a malware attack or perhaps somebody played a prank on you, there are times when you need to make modifications to the host files on your computer. Hosts File Editor is a small utility that enables you to effortlessly and freely manage the access to websites and network traffic by editing the host files.

Prerequisitie

  • Microsoft .NET Framework 4.0 Client Profile

Software Info.

Software NameHosts File Editor
Platform(s) SuppotedWindows
DeveloperNebojsa Vucinic – Trebinje
Size1.7 MB
PriceFree

Method #2: Manual Edit Hosts File

1. Press  + R to open Run program and type Notepad in it.

2. Go to File > Open and Navigate to c:\Windows\System32\Drivers\etc\hosts.

3. Add you codes/lines in the end of the file.

4. Save it.

How to Edit Host File in Linux?

1. Open up terminal and put below command in it.

sudo nano /etc/hosts

2. Enter your password for Linux

3. Add you codes/lines in the end of the file.

4. Press CTRL + X and then type Y to Save file.

How to Edit Host File in MacOS?

1. Open up terminal and put below command in it.

sudo nano /private/etc/hosts

2. Enter your password for Linux

3. Add you codes/lines in the end of the file.

4. Press CTRL + X and then type Y to Save file.

5. To Make your changes take effect, enter below command.

dscacheutil -flushcache

 

Harman Singh Hira
Harman Singh Hirahttps://me.hsinghhira.me/
He is a young Blogger, Website Designer and owns his popularity to the fact that he posts genuine contents to his blog and believe in good rituals.

- Advertisement -

Worldwide News, Local News in London, Tips & Tricks

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Privacy Settings saved!
Privacy Settings

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. Control your personal Cookie Services here.

These cookies are necessary for the website to function and cannot be switched off in our systems.

For performance reasons, we use Cloudflare as a CDN network. This saves a cookie "__cfduid" to apply security settings on a per-client basis. This cookie is strictly necessary for Cloudflare's security features and cannot be turned off.

In order to use this website we use the following technically required cookies
  • wordpress_test_cookie
  • wordpress_logged_in_
  • wordpress_sec

Decline all Services
Accept all Services