35
How can I block websites? (programming.dev)
submitted 2 days ago* (last edited 2 days ago) by staircase@programming.dev to c/linux@lemmy.ml

tl;dr what are all the ways I can block a website on linux? Debian if it's relevant.

I want to stop myself using certain sites. Since I'm reasonably techy and can work round all blocks I've come up with, I've found an effective approach is to apply as many hurdles as possible, so that visiting the website takes effort.

So far I've added the site to ublock's block list, and redirected sites via /etc/hosts. What other options are there?

While I have admin access to the router, I'm not allowed to block sites there.

you are viewing a single comment's thread
view the rest of the comments
[-] anamethatisnt@sopuli.xyz 5 points 2 days ago

Only thing I can think of is to remove your default account from the sudoers file and have an account with a frustratingly long password written on physical paper hold the keys to the kingdom. That will make a whole lot of other things a hurdle too though.

[-] Peffse@lemmy.world 6 points 2 days ago

Yeah, whatever roadblocks are set up can easily be dismantled using the same privs.

Only way to achieve this goal is to either hand the keys to someone else or to lock yourself out.

[-] Scrath@lemmy.dbzer0.com 1 points 19 hours ago* (last edited 19 hours ago)

Making it a hassle to circumvent the roadblocks can help make the undesired behavior less attractive to you in the moment or stop unconscious behavior.

For example, I sometimes open lemmy just with my muscle memory when I'm bored without even thinking about it, even though I know I've scrolled through pretty much all the current content I get in my feed already.

Moving the app icon around stops me from opening lemmy without actively thinking about it and therefore adds a (admittedly small) barrier to my bad behavior.

Adding a long and complex password that I would have to enter manually, as someone in the comments recommend, would probably make me rethink my actions even more. Do I really want to get out the password and be annoyed by having to type it out just to do this?

this post was submitted on 12 Jun 2026
35 points (90.7% liked)

Linux

65744 readers
656 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS