Hosts file: 60 фото
Вопросы и ответы
Windows users. In Windows 10 the hosts file is located at c:\Windows\System32\Drivers\etc\hosts. Right click on Notepad in your start menu and select “Run as Administrator”.
A Hosts file is a file that almost all computers and operating systems can use to map a connection between an IP address and domain names. This file is an ASCII text file. It contains IP addresses separated by a space and then a domain name. Each address gets its own line.
Windows
- Press the Windows key.
- Type Notepad in the search field.
- In the search results, right-click Notepad and select Run as. administrator.
- From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts.
- Make the necessary changes to the file.
- Select File > Save to save your changes.
Once you're logged in to a command prompt, do the following:
- Open the file with the nano text editor: nano /etc/hosts.
- Add the following line to the end of the file: 127.0. 0.1 www.example.com.
- Press CTRL+X and when prompted, type “Y” to save your changes and exit nano.
The /etc/hosts file contains the Internet Protocol (IP) host names and addresses for the local host and other hosts in the Internet network. This file is used to resolve a name into an address (that is, to translate a host name into its Internet address).