How to edit the hosts file on Ubuntu and block a website

  • Post category:Linux
  • Post last modified:November 25, 2017
  • Post author:

The hosts file is an OS based plain text file that maps hostnames to IP addresses.It contains lines of IP address in the first field and host names in the second field. Each field is separated by tab space. you can also add a comment line by adding a hash (#) in the front.

Edit the hosts file on Ubuntu:

Open your Terminal app searching “terminal” in the unity dash or by press Ctrl+Alt+T key combination. If you want to take a backup of your hosts file , typing the following command in your terminal app.
(more…)

Continue ReadingHow to edit the hosts file on Ubuntu and block a website