Linux & Windows modify the Hosts

Linux & Windows modify the Hosts

[top]

Hosts: the static table lookup for host name (hostname query static table)

ip address corresponding to the presence of hosts and a domain name correspondence table on the operating system.

C in the presence of the windows: \ Windows \ System32 \ drivers \ etc \ hosts

Linux present in the / etc / hosts

We can directly access the local domain name server by adding or modifying different ip corresponding domain name.

Issues into

For example: I would seafile network which has a server used to manage files, and I had to seafile network penetration, but I would like to penetrate the network access my domain name will slow especially when (external network server limit a), so I can pass the time, including the network access domain name corresponds directly to a computer via ip intranet.

modify

So I modified the windows of hosts. Open the C: \ Windows \ System32 \ drivers \ etc \ hosts file, the last position with a text editor 192.168.123.24 seafile.xxx.com

Modifies the hosts on Linux can vi / etc / hosts

test

Ping seafile.xxx.com can be tested in cmd inside

supplement

If you can not test, you can refresh the cache

ipconfig /flushdns

hosts file contains the mapping between the ip address and host name, includes aliases for the host. In the absence of a name server, all network programs on the system to resolve by querying the file corresponds to the ip address of a host name, otherwise you need to use dns service program to solve. By common domain names and ip addresses can be mapped added to the hosts file to achieve quick and easy access. Priority: dns cache> hosts> dns service

reference

Blog

Published 91 original articles · won praise 9 · views 10000 +

Guess you like

Origin blog.csdn.net/WeDon_t/article/details/103037772