How To Use Etc Hosts File

In open file dialogue box type c windows system32 drivers etc as the file name entry.
How to use etc hosts file. To view files in etc folder use the down arrow to switch to all files view. In the file name field paste the following path in. Alternatively you can navigate to c windows system32 drivers etc using the left pane menu. To access the hosts file in windows 7 you can use the following command in the run line to open notepad and the file. Follow the screenshot for better understanding.
Once the files are visible select hosts file and click on the open button. Configure dns locally using etc hosts file in linux. 2 after that in the command prompt window type the below commands one after another to go to the hosts file directory and open the hosts file in the notepad program. This step is required because the hosts file doesn t have the txt file extension. Once notepad is open you can edit the file.
1 on the windows 10 computer right click on the start menu and select command prompt admin. 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. Let s use notepad for example first and most important is that you open notepad or your favorite text editor with administrator permissions. Ip address host name aliases ip address is the ip address of the host. Select text documents txt in the bottom right of the open window and change it to all files.
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. You can edit the hosts file using any text editor. Open notepad or another text editor like notepad. How to open and view the hosts etc hosts file in windows. Go to the real hosts file location and rename it.
Edit using the correct format and save the hosts file with windows notepad. In the text editor select file open and open the host file location at c windows system32 drivers etc. In this example we will block facebook. From a workstation that has access to your storage system edit the etc hosts file. To do this just enter in the following after the mark.