I want to use a Linux distro for my PC that’s independent, meaning that it has no ties to Google. Any suggestions will be greatly appreciated.
any would do..
It solely depends: Because accessing Google forces the connection anyway. If you use a Linux OS that has heavy restrictions on trackers, it might limit Google’s access to your device.
Okay, thank you & I’ll keep searching for a good one.
Although Linux is much more secure than Windows, some OS systems seem to have more ties with them than others, so I’m concerned that some have inherently Google-friendly code written into their OS systems.
Glad you asked! Than I am not alone!
Possibly Mint or Tails.
But I recommend to just go with this hosts list
But if you are feeling extra radical you can use my sledgehammer approach (can break some websites):
#!/usr/bin/env bash
set -euo pipefail
if ! command -v curl >/dev/null 2>&1; then
echo "curl not found, please install curl and rerun."
exit 1
fi
if ! command -v jq >/dev/null 2>&1; then
echo "jq not found, please install jq and rerun."
exit 1
fi
TMPDIR="$(mktemp -d)"
GOOG_JSON="$TMPDIR/goog.json"
CLOUD_JSON="$TMPDIR/cloud.json"
OUT_CIDRS="$TMPDIR/google_cidrs.txt"
echo "Fetching Google IP ranges..."
curl -fsSL https://www.gstatic.com/ipranges/goog.json -o "$GOOG_JSON"
curl -fsSL https://www.gstatic.com/ipranges/cloud.json -o "$CLOUD_JSON"
echo "Computing goog minus cloud (CIDR equality subtraction)..."
jq -r '.prefixes[] | (.ipv4Prefix // .ipv6Prefix) // empty' "$GOOG_JSON" | sort -u > "$TMPDIR/g_set.txt"
jq -r '.prefixes[] | (.ipv4Prefix // .ipv6Prefix) // empty' "$CLOUD_JSON" | sort -u > "$TMPDIR/c_set.txt"
comm -23 "$TMPDIR/g_set.txt" "$TMPDIR/c_set.txt" > "$OUT_CIDRS"
if [ ! -s "$OUT_CIDRS" ]; then
echo "No CIDRs generated. Exiting."
rm -rf "$TMPDIR"
exit 1
fi
echo "Select firewall backend: 1) nftables 2) iptables+ipset 3) ufw"
read -r -p "Enter 1, 2 or 3: " CHOICE
if [ "$CHOICE" = "1" ]; then
if ! command -v nft >/dev/null 2>&1; then
echo "nft not found. Install nftables and rerun."
rm -rf "$TMPDIR"
exit 1
fi
echo "Creating nftables table/sets and adding CIDRs..."
sudo nft add table inet filter 2>/dev/null || true
sudo nft add set inet filter google_ips4 '{ type ipv4_addr; flags interval; }' 2>/dev/null || true
sudo nft add set inet filter google_ips6 '{ type ipv6_addr; flags interval; }' 2>/dev/null || true
while read -r cidr; do
if [[ $cidr == *:* ]]; then
sudo nft add element inet filter google_ips6 { "$cidr" } 2>/dev/null || true
else
sudo nft add element inet filter google_ips4 { "$cidr" } 2>/dev/null || true
fi
done < "$OUT_CIDRS"
sudo nft list chain inet filter output >/dev/null 2>&1 || sudo nft add chain inet filter output '{ type filter hook output priority 0; policy accept; }'
sudo nft insert rule inet filter output ip daddr @google_ips4 counter drop 2>/dev/null || true
sudo nft insert rule inet filter output ip6 daddr @google_ips6 counter drop 2>/dev/null || true
echo "nftables rules applied. Enable nftables service to persist."
elif [ "$CHOICE" = "2" ]; then
if ! command -v ipset >/dev/null 2>&1 || ! command -v iptables >/dev/null 2>&1; then
echo "ipset or iptables missing. Install them and rerun."
rm -rf "$TMPDIR"
exit 1
fi
echo "Creating ipset(s) and applying iptables rules..."
sudo ipset create googlehash hash:net family inet hashsize 1024 maxelem 65536 2>/dev/null || true
sudo ipset create googlehash6 hash:net family inet6 hashsize 1024 maxelem 65536 2>/dev/null || true
while read -r cidr; do
if [[ $cidr == *:* ]]; then
sudo ipset add googlehash6 "$cidr" 2>/dev/null || true
else
sudo ipset add googlehash "$cidr" 2>/dev/null || true
fi
done < "$OUT_CIDRS"
sudo iptables -C OUTPUT -m set --match-set googlehash dst -j DROP 2>/dev/null || sudo iptables -I OUTPUT -m set --match-set googlehash dst -j DROP
if command -v ip6tables >/dev/null 2>&1; then
sudo ip6tables -C OUTPUT -m set --match-set googlehash6 dst -j DROP 2>/dev/null || sudo ip6tables -I OUTPUT -m set --match-set googlehash6 dst -j DROP
fi
echo "iptables/ipset rules applied. Persist with ipset-persistent/iptables-persistent."
elif [ "$CHOICE" = "3" ]; then
if ! command -v ufw >/dev/null 2>&1; then
echo "ufw not found. Install UFW and rerun."
rm -rf "$TMPDIR"
exit 1
fi
echo "Applying UFW deny out rules for each CIDR..."
while read -r cidr; do
sudo ufw deny out to "$cidr" || true
done < "$OUT_CIDRS"
sudo ufw reload || true
echo "UFW rules applied."
else
echo "Invalid selection."
rm -rf "$TMPDIR"
exit 1
fi
rm -rf "$TMPDIR"
echo "Done."
(Google publishes it’s crap here and here)
If you go with my script you will need to enable that manually (like ufw enable). If you don’t know about firewalls, just go with first solution and just paste it’s content into your hosts file.
@datadrvn What do you use your computer for? i.e. Just browsing? Multimedia? Coding? Research? School? …?
Thank you. Although I REALLY appreciate your response, I’m not a developer, so I can’t implement what you’re instructing me to do.
I use my computer for searching the Internet, studying and creating docs.
Than go with this approach from here
It is really easy:
- open terminal
- run cd
- Then run nano no-google.sh
- In window opened paste this:
#!/bin/bash
set -e
TMPFILE=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/nickspaargaren/no-google/refs/heads/master/google-domains -o "$TMPFILE"
if [ ! -s "$TMPFILE" ]; then
rm -f "$TMPFILE"
exit 1
fi
HOSTS_FILE="/etc/hosts"
BACKUP="${HOSTS_FILE}.bak.$(date +%s)"
cp "$HOSTS_FILE" "$BACKUP"
awk '!/^($|#)/ {print "0.0.0.0 " $1}' "$TMPFILE" | sort -u > "${TMPFILE}.hosts"
grep -Fq "### no-google block start" "$HOSTS_FILE" && sed -n '1,/### no-google block start/p' "$HOSTS_FILE" > "${HOSTS_FILE}.tmp" || cp "$HOSTS_FILE" "${HOSTS_FILE}.tmp"
{
cat "${HOSTS_FILE}.tmp"
echo "### no-google block start"
cat "${TMPFILE}.hosts"
echo "### no-google block end"
} > "${HOSTS_FILE}.new"
mv "${HOSTS_FILE}.new" "$HOSTS_FILE"
rm -f "$TMPFILE" "${TMPFILE}.hosts" "${HOSTS_FILE}.tmp"
systemctl restart NetworkManager 2>/dev/null || true
exit 0
- Then press ctrl+o
- Then press enter
- Then press ctrl+x
- Then run sudo bash no-google.sh
- Done.
@datadrvn Then try this distro: Trisquel GNU/Linux - Run free!
Debian is another one. Slackware, if you are feeling ambitious.
Thank you BIG time! and I’ve tried Cinnamon Mint in the past and it was too steep of a learning curve for me, but I looked at Tails and hopefully sites won’t stop me from using them because I’m on TOR.
Thank you, I’m ambitious, but I read its review and although it seems really good, it’s out of my league for a beginner.
Slackware has the utilities you need after install. If you want additional software, it is not so difficult and the IRC channel is superb as support. But based on what you told me (internet and docs), the default packages will get you going. I am not sophisticated Linux user, but I learned a lot about Linux using it. If you want to feel confident about Linux moving forward, it is a great distro to go with.
Thank you for your input.