Zugbug

Ubuntu Hosts

May 19th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. Guide for editing hosts file in Ubuntu/Debian
  2.  
  3. There are two easy ways: Terminal and GUI.
  4.  
  5. 1.a) Terminal:
  6.  
  7. Open your Terminal application. Make sure you're in Superuser mode (enter "sudo su" into the terminal).
  8. Once you have su abilities, access the file /etc/hosts with your favourite file editor (I prefer "nano" for it's user-friendliness).
  9.  
  10. 1.b) GUI:
  11.  
  12. Run TextEdit (GEdit) as ROOT (Done through right click on the application).
  13. Press CTRL+O and locate file /etc/hosts and open it.
  14.  
  15. 2) Next step:
  16. Locate the bottom of the file and add the following lines to it:
  17.  
  18. "
  19. 178.73.210.219 thepiratebay.se
  20. 178.73.210.219 www.thepiratebay.se
  21. 178.73.210.219 thepiratebay.org
  22. 178.73.210.219 www.thepiratebay.org
  23. "
  24. (Without the quotation marks)
  25.  
  26. And then save the file.
  27.  
  28. Try accessing http://thepiratebay.se/. If it works, then everything is configured correctly. If not try opening a Terminal and flushing your DNS cache (done through ifconfig) or rebooting your computer.
  29.  
  30. To restore your hosts file to how it was before simply open the file in the same way, delete the 4 lines then save.
Advertisement
Add Comment
Please, Sign In to add comment