Hosts file is a Plain text file used in Operating system to map hostname to their corresponding IP addresses. While writing the url on the browser, System checks the appropriate entry in the Hosts file and if it finds one then your system will call it otherwise system will send request your ISP(internet service provider). It consists of one or more than IP address with their corresponding host names. The IP address should be placed in the first column followed by the corresponding host name. Hostname is separated by atleast one Space from IP address.
If you are on Windows then you should click here to edit host file.
HACER NETO
- Open Terminal (Go to application folder>Utilities>Terminal).
- Copy and paste the below code in to Terminal and Press Enter.
sudo nano /private/etc/hosts
- Now, Enter your Password.
- Hosts file contains some comments (lines starting with the # symbol), as well as some default hostname (e.g. 127.0.0.1 – localhost).You can edit the default values to write new IP address and host name or by simply write below the default IP addresses.
- Click Save or Press Ctrl+O and Ctrl+y to exit the terminal.
- Now Restart your Browser.
- Open the Terminal (Go to application folder>Utilities>Terminal).
- Copy and paste the below code in to Terminal and press enter.
sudo pico /etc/hosts
- Now, Enter your Password.
- It contains some comments (lines starting with the # symbol), as well as some default hostname (e.g. 127.0.0.1 – localhost). You can edit the default values to write new IP address and host name or by simply write below the default IP addresses.
- Save the file by pressing Ctrl+O and to exit the terminal press Ctrl+y.
- Now restart your browser .
As Hosts File maps the Host name to their IP address. it can be used to re-direct a Hostname to a different IP addresses and hence to a completely different website.
0 comments:
Post a Comment