Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-expand-tabs-free domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/websitedevait/public_html/wp-includes/functions.php on line 6131
How do I modify my hosts file on a Linux Machine? | Advanced Internet Technologies

How can modifying your hosts file help you?

Modifying your hosts file will allow you to override the DNS for a domain on that particular machine. To give you an example, if you are moving your hosting from another provider to AIT, and have uploaded your data and you want to test the site before making the name server changes, you can modify your hosts file to point the site to your new IP at AIT. This type of modification can be used to test your sites prior to going live, verify SSL installations, verify a site works prior to DNS changes, or for other DNS related reasons. This causes your local machine only to look directly at the IP specified.

How do I edit the hosts file on a Linux Machine?

Editing the hosts file is easy. Follow the steps below.

  • Open a terminal window.
  • Open the hosts file in a text editor (you can substitute any text editor):

sudo `vi /etc/hosts`

  1. Enter your password.
  2. Make the necessary changes to the hosts file.
  3. Press + (hold shift and hit :), then type wq to save the changes.