Using hostnames is an easier way to remember about one’s server rather than using it’s ip, like localhost for 127.0.0.1, etc. To add the hostname in windows, we have to edit the “hosts” file present in the etc folder in both windows and linux. In windows, it is present in : C:\Windows\System32\drivers\etc\ and in Linux