Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Blocking websites on Linux

Options
  • 19-02-2023 12:31pm
    #1
    Registered Users Posts: 25


    I am looking to block websites to avoid procrastinating and to focus on work. Can anyone explain how to block unwanted websites?



Comments

  • Registered Users Posts: 5,173 ✭✭✭LambshankRedemption




  • Posts: 0 ✭✭✭✭ [Deleted User]


    Try:

    sudo nano /etc/hosts

    You can now edit the file to block specified websites you don’t want to see. You need to add a new line for each one. 

    Enter ip address 127.0.0.1 followed by domain name, eg www.boards.ie

    Save file ctrl + x, followed by y to confirm the save. 

    Hope it works for you! 

    edit - just make sure of your path to the “hosts” file when using the nano editor in the terminal. I’m sure you know this, you can use “find hosts” to get to it and then type “pwd” to determine the exact path and work away with “sudo nano” followed by that path.

    Post edited by [Deleted User] on


Advertisement