How to modify a hosts file in Windows 7, Windows 8/10, Mac OS and Ubuntu?

By Editing Host File, you can point IP Address for a Domain in your local system.

 

Windows 7 :

 

Note : You can also use these steps to modify host file in Windows 8/10 as well.

 

  1. Press Windows+R to open Run.

  2. Enter Below Command to open host file in notepad.
# notepad c:\windows\system32\drivers\etc\hosts
 
  1. Modify the required line and save your changes.



 

Ubuntu :

 

We will use nano editor to modify host file in ubuntu. You can use your favorite editor. You can find host file at path /etc/ folder. We logged in as root user here. You can use sudo if you are not logged in with root user.

  1. Hit below command.
# nano /etc/hosts

          

  1. Modify the Required line and save your settings by ctr+x Button. Press Y to complete save changes.



Mac OS X : 

 

You will find the host file in MAC OS at the same path as we see in Ubuntu.

  1. Open a GUI Text Editor.

  2. Access the file at /etc/ folder using below command.
# vim /etc/hosts
  1. Modify your changes and save the Host file.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to check Ping Report from Windows 7, 8 and 10?

You can use our Ping testing tool to test Ping alert from your local system to our Denver...

How ImunifyAV+ is useful?

ImunifyAV+ is an effective anti-malware service. It is used to scan and detect the malware lied...

How to make your ASP.Net applications secure?

Adding security to Web apps may not be great fun but it doesn't have to be hard. You can easily...

How do I check current established connections and network utilization of my VPS?

Windows VPS   For current established connections and processes:   Go to Run Type cmd, hit...

How to check your VPS Disk Drive is SSD or HDD?

We use HyperV virtualization technology for our Denver based Classic and SSD Windows VPS. We have...