How To Use Etc Hosts File
Ip address host name aliases ip address is the ip address of the host.
How to use etc hosts file. To view files in etc folder use the down arrow to switch to all files view. Right click notepad and choose run as administrator. Configure dns locally using etc hosts file in linux. Host name is the name of the host. This step is required because the hosts file doesn t have the txt file extension.
192 168 56 1 ubuntu tecmint lan 192 168 56 10 centos tecmint lan. Once notepad is open you can edit the file. Now that you have edited your hosts file make sure to save it. 1 on the windows 10 computer right click on the start menu and select command prompt admin. Open notepad or another text editor like notepad.
Create a new hosts file somewhere like the desktop or documents. Select text documents txt in the bottom right of the open window and change it to all files. To do this just enter in the following after the mark. Now notice if we try to access facebook in ie we can t get to the page. How to open and view the hosts etc hosts file in windows.
In the text editor select file open and open the host file location at c windows system32 drivers etc. Let s use notepad for example first and most important is that you open notepad or your favorite text editor with administrator permissions. In open file dialogue box type c windows system32 drivers etc as the file name entry. Now open the etc hosts file using your editor of choice as follows sudo vi etc hosts then add the lines below to the end of the file as shown in the screen shot below. Copy and paste the new hosts file to that location accepting the permissions popup.
In the file name field paste the following path in. One way to do that is to search for the word notepad in windows 10 right click or tap and hold the notepad search result and. Add the following line to the etc hosts file. Edit using the correct format and save the hosts file with windows notepad. Go to the real hosts file location and rename it.