Guide

Block porn on
your Linux machine.

Linux ships no content filter at all — which is usually a feature, and here is exactly the problem. The tools you'd reach for are real but all reversible by the person who set them up. Here are the options, honestly, and what each one actually buys.

Jump to the steps Sworn for Linux

Free malware and ad/tracker blocking, always. Pornography and other categories, plus partner alerts: 7-day free trial, then $7/month for your phone and your computers together.

Option 1 · By hand

The tools already on the machine.

There's no distribution-level parental control to enable, so the usual advice is to assemble something from parts. Each of these works. Each has the same shape of problem.

  1. A

    The hosts file

    Point known adult domains at nowhere by adding them to /etc/hosts, usually from a published blocklist. It covers every app on the machine and costs nothing. It's also a hand-maintained file that ages from the day you stop updating it, and it takes one sudo and one editor to undo.

  2. B

    systemd-resolved

    Set DNS= in /etc/systemd/resolved.conf to a filtering provider and the whole machine looks up addresses through it. Cleaner than the hosts file and self-updating, because the provider maintains the list. Reversible from the same file.

  3. C

    A proxy or browser extension

    Fine as a speed bump in one browser. It doesn't cover other browsers or anything else on the machine, and it's removed from inside the thing it protects.

The common gap is that you are root on your own machine, so every one of these is a command away from being undone — and none of them tells anyone that it was.

Option 2 · At the router

Filtering the whole network.

Set a filtering DNS provider on the router and every device in the house inherits it — the Linux desktop, the TV, a guest's phone. For a household this is often the right first move, and it takes one settings page.

  1. Open your router's admin page and find the DNS servers under WAN, Internet or DHCP settings.
  2. Enter a filtering provider's addresses in place of your ISP's, save, and reboot the router.
  3. Check a device to confirm the filter is applying before you rely on it.

The first honest limit is that it stops at the front door. A laptop on café Wi‑Fi, on a phone hotspot, or on a VPN is outside it entirely. And on the machine itself, resolved.conf or a per-connection setting overrides what the router hands out — again with nobody told.

Option 3 · With accountability

An accountability filter (Sworn).

Sworn uses the same DNS lever as Option 1B. A small systemd service sends every lookup, from every app and browser, through your Sworn account, and it adds the piece none of the above has: someone you trust is told if you stop it or remove it. It's one honest option, not the only answer.

Start on your phone. Sworn for Linux pairs with your Sworn account rather than standing alone, so install the phone app first and pick your categories there. The machine then inherits them, which leaves one account, one partner and one alert stream instead of a second thing to maintain.

Install from the apt or dnf repository, so it updates with the rest of your system rather than becoming another thing you have to remember:

$ curl -fsSL https://sworn.snowleopard.dev/install | sh

Piping a script into a shell deserves suspicion, so here is what that one does: it downloads our package-signing key, checks it against a SHA-256 pinned in the script itself, adds the repository, and installs the package through apt or dnf. No binary is piped into your shell, and every future update is verified against the same key by your package manager. If you'd rather add the repository by hand, the exact apt and dnf lines and the checksums are on the Linux page. Debian 12+, Ubuntu 22.04+, Mint, Pop!_OS, Fedora 40+, RHEL / Rocky / Alma 9+ on x86_64 and ARM64.

  1. Install Sworn on your phone and pick pornography. Add gambling, social media, online shopping, gaming or VPN/proxy too if you want. Malware and ad/tracker blocking are free forever; the other categories and partner alerts come with a 7-day free trial, then $7/month covering your phone and your computers.
  2. Install the package. Your DNS is not changed until you pair, so installing it can't break a machine you're in the middle of using.
  3. Pair with a code from your phone. In Sworn on your phone: Settings → Add a computer. It shows a short code good for ten minutes. Enter it from the tray icon, or open http://127.0.0.1:8453 in a browser.
  4. (Optional) Add an accountability partner. They get an invite to confirm, and at most one reminder; they have a week to click it. After that they only ever see a count of blocked attempts and the category, plus a note if you unblock a category and an email if the filter is paused, removed or goes quiet. Never a URL, never your history, never even which machine.

Sworn for Linux Get the phone app

No VPN, so your work tools and VPN client keep working. System-wide, so it's every app and not one browser. No screenshots and no log of the sites you visit; blocked attempts are kept only as short-lived tallies that power your own in-app view and expire after 7 days, and a partner sees a number and a category, never a site. Two honest limits carry over from the options above. A browser running its own encrypted DNS can go around it, and you are still root — you can stop the service. The difference is that stopping it is no longer silent.

Which should I pick?

Which one is right for you?

Covering a household? Start at the router — one change, every device, including ones you can't install software on. Covering yourself on your own machine? You have root, so no configuration you write is a lock, and pretending otherwise is how people end up trusting something that wasn't holding. The useful question isn't how to make it unremovable. It's whether removing it is visible to someone who cares. That's the one thing a config file can't do for you.

Using another computer too? There are companion guides for Windows, Mac and Chromebook, and the same account covers all of them.

Every app on the machine —
with someone in your corner.

Start on your phone, then pair the machine. About five minutes for both.

Already have Sworn on your phone? The install line is at the top of the Linux page.