How To Use Etc Hosts File
To do this just enter in the following after the mark.
How to use etc hosts file. Edit using the correct format and save the hosts file with windows notepad. Once notepad is open you can edit the file. This step is required because the hosts file doesn t have the txt file extension. Follow the screenshot for better understanding. Open notepad or another text editor like notepad.
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. 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. In notepad click file then open. From a workstation that has access to your storage system edit the etc hosts file. Go to the real hosts file location and rename it.
Create a new hosts file somewhere like the desktop or documents. You can edit the hosts file using any text editor. Now notice if we try to access facebook in ie we can t get to the page. Right click notepad and choose run as administrator. 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.
To access the hosts file in windows 7 you can use the following command in the run line to open notepad and the file. In this example we will block facebook. In the file name field paste the following path in. Let s use notepad for example first and most important is that you open notepad or your favorite text editor with administrator permissions. Add the following line to the etc hosts file.
Copy and paste the new hosts file to that location accepting the permissions popup. Once the files are visible select hosts file and click on the open button. To view files in etc folder use the down arrow to switch to all files view. 192 168 56 1 ubuntu tecmint lan 192 168 56 10 centos tecmint lan. 1 on the windows 10 computer right click on the start menu and select command prompt admin.