Results 1 to 8 of 8

Thread: The hosts file

  1. #1
    Join Date
    Dec 2020
    Beans
    12

    The hosts file

    I am running Ubuntu 20.04.2 LTS and really enjoy using the OS.

    But i do have a couple of problems and they are:

    1) I want to block my computer from accessing Facebook via the hosts file
    and the command line. Could someone show me how to go about this
    please.

    2) I suffer with cataracts in both eyes and find it very difficult to read the text in the Ubuntu terminal.
    Could someone please help me out here and show me how to enlarge the textl please.

    Many thanks

  2. #2
    Join Date
    May 2008
    Beans
    1,976
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: The hosts file

    Quote Originally Posted by billywyatt2 View Post
    2) I suffer with cataracts in both eyes and find it very difficult to read the text in the Ubuntu terminal.
    Could someone please help me out here and show me how to enlarge the textl please
    This is for GNOME terminal:-

    Open terminal > Edit > Preferences > Custom Font > Click Monospace Regular 11 (probably)
    A new editing box will appear to allow you to specify the font size.

    Pink arrow on attached screenshot

    terminal_font.jpg
    Last edited by tea for one; June 28th, 2021 at 01:06 PM. Reason: Changed purple to pink

  3. #3
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    1,136
    Distro
    Lubuntu Development Release

    Re: The hosts file

    To block facebook via hosts, you can just add lines like

    Code:
    127.0.0.1    facebook.com
    Nice and easy it feels like; but facebook have a load of other addresses; my current list (which I got from online) has 191 such records needed just to block facebook (okay that count includes maybe 4 comment lines which aren't needed)

    I can't recall where I got my list (I know it was from a youtuber, but it wasn't his list and I forget where it was from, so I won't currently provide it, but a quick list I found is)

    https://gist.github.com/djaiss/85a0ada83e6bca68e41e

    As that only provides 12 lines (for facebook); it's somewhat less complete than what I'm currently using.. but you'll get the idea anyway.
    Last edited by guiverc; June 28th, 2021 at 12:47 PM.

  4. #4
    Join Date
    May 2010
    Beans
    1,614

    Re: The hosts file

    It's the same as in Windows

  5. #5
    Join Date
    Dec 2020
    Beans
    12

    Re: The hosts file

    I have finally been able to enlarge the text in the terminal - Yippee!

    As for the hosts file, i opened a terminal and typed:
    Code:
    sudo pluma /etc/hosts
    The hosts file opened
    and then i typed:
    Code:
    127.0.0.1 facebook.com
    Clicked on save and still no difference?

    Thanks for all the help everyone but i have decided to turn off my Desktop computer
    until i have had the operation to remove these cataracts.

  6. #6
    Join Date
    May 2010
    Beans
    1,614

    Re: The hosts file

    If the DNS has been cached recently then the cache will be used. I suspect this will work now

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: The hosts file

    https://lifehacker.com/how-to-block-...speed-30814279
    Note the article date and which websites are blocked.

  8. #8
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,287
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: The hosts file

    For quick enlarging or shrinking text: Ctrl + (you may need the shift key as well to get a plus) and Ctrl - will do the trick.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •