How To Use Etc Hosts File
From a workstation that has access to your storage system edit the etc hosts file.
How to use etc hosts file. Open notepad or another text editor like notepad. To view files in etc folder use the down arrow to switch to all files view. Copy and paste the new hosts file to that location accepting the permissions popup. 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. To access the hosts file in windows 7 you can use the following command in the run line to open notepad and the file.
You can edit the hosts file using any text editor. 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. 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. In this example we will block facebook.
Let s use notepad for example first and most important is that you open notepad or your favorite text editor with administrator permissions. 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. Follow the screenshot for better understanding. Configure dns locally using etc hosts file in linux. Add the following line to the etc hosts file.
Right click notepad and choose run as administrator. In the file name field paste the following path in. Create a new hosts file somewhere like the desktop or documents. Edit using the correct format and save the hosts file with windows notepad. Host name is the name of the host.
In open file dialogue box type c windows system32 drivers etc as the file name entry. Alternatively you can navigate to c windows system32 drivers etc using the left pane menu. This step is required because the hosts file doesn t have the txt file extension. Once notepad is open you can edit the file. Once the files are visible select hosts file and click on the open button.