How to Modify your hosts file in Linux, Windows, and Mac
In this tutorial, we will show you How to Modify your hosts file in Linux, Windows, and Mac.
LinuxTo modify your host file in Linux first login as root user and edit /etc/hosts by running this command:
nano /etc/hostsEnter your domain, user, password and make changes. To save it Press Ctrl+X and answer with Y.
WindowsTo modify your hosts file in Windows press Start and search for Notepad software.After founding open this software by Run as administrator. From notepad open c:\Windows\System32\Drivers\etc\hosts file and make changes. To save it Press File and Save.
Mac OS X 10.6To modify your hosts file in Mac open Terminal and type this command to open hosts file.
sudo nano /private/etc/hostsWhen prompt type domain, user, and password. Edit the hosts file and save changes by pressing CTRL+X.When prompt answer Y. To get effect run:
dscacheutil -flushcacheYou have successfully Modify your hosts file in Linux, Windows, and Mac. Enjoy!