← All free guides
FREE GUIDE · 102 TIPS · 11 CATEGORIES

100+ Stealth &
Safety Tips for Linux Users

A cybersecurity guide to the universe. Practical, no-nonsense privacy and security habits for everyday Linux users: encryption, hardening, safe defaults, and a healthy skepticism toward security theater.

102
Tips
11
Categories
17
Pages
Free
No sign-up

Inside the guide: all 102 tips

1Network & Traffic Privacy11 tips

Get the order of operations right here in particular — several of these change what your machine is reachable on, and getting the sequence wrong is the single most common way people accidentally lock themselves out of their own remote server.

1.1 Route traffic through a trustworthy VPN, not just "a VPN"

A VPN doesn't remove trust from the equation, it relocates it — from your ISP to the VPN provider. Picking one because of a catchy ad instead of a track record just means trusting a company you know less about than the one you were trying to get away from. Look for an independently audited no-logs policy (not just a claim on the homepage), a jurisdiction with reasonable legal protections, and ideally a provider that's already been tested for real — a server seizure or subpoena that turned up nothing useful, documented publicly.

GOOD TO KNOW: "No logs" is a claim until it's been independently audited or tested in court. Read the audit report, not the marketing page.

1.2 Encrypt your DNS lookups

Example: DNSOverTLS=yes in /etc/systemd/resolved.conf, then systemctl restart systemd-resolved. Without this, every domain name you look up travels the network in plain text — trivially readable by your ISP, a coffee shop's router, or anyone else on the same network segment, even when the website itself loads over HTTPS afterward. Confirm it actually took effect with resolvectl status and check for "DNSOverTLS: yes" next to your active interface — a saved config file that didn't get picked up is a very easy thing to miss.

1.3 Randomize your Wi-Fi MAC address

Example: nmcli connection modify Wi-Fi wifi.cloned-mac-address random. Stops passive tracking of your device across networks and venues by its hardware address alone — retail Wi-Fi analytics and some ad networks build surprisingly detailed movement profiles from nothing but MAC addresses seen at different access points over time.

GOOD TO KNOW: Randomization only helps until you log in somewhere identifiable on that connection — at that point the network operator can link the session to you anyway. It closes the passive-tracking gap, not the active one.

  • 1.4 Use WireGuard for tunnels you control
  • 1.5 Check what's actually listening on your machine
  • 1.6 Set up a kill switch, not just a VPN client
  • 1.7 Watch for WebRTC leaks in the browser
  • 1.8 Firewall by default-deny, not default-allow
  • 1.9 Use Tor for what actually needs Tor
  • 1.10 Choose your DNS resolver deliberately
  • 1.11 Verify your VPN is doing what you think it's doing
2Disk & Data Encryption9 tips

2.1 Encrypt the whole disk, not just the home folder

Full-disk encryption with LUKS at install time protects swap, temp files, and application logs too — not just the documents folder most people think of first. A "just encrypt home" setup still leaves plenty of sensitive fragments (crash dumps, cache files, swapped-out memory) sitting in the clear on the rest of the disk.

2.2 Know what luksOpen actually protects

cryptsetup luksOpen protects data at rest — while the machine is powered off or the volume is locked. Once the disk is unlocked and the system is running, the data is exactly as exposed as it would be on an unencrypted disk; full-disk encryption defends against a stolen or seized machine, not against a compromise of the running system.

2.3 Encrypt swap separately if you skipped full-disk encryption

Swap can contain sensitive memory contents — passwords typed into forms, decrypted document fragments, private key material — even from a session that otherwise felt perfectly secure. Set it up with cryptsetup and a random key generated at each boot (/dev/urandom-backed), since swap doesn't need to survive a reboot the way your root filesystem does.

  • 2.4 Understand the tradeoff before enabling TPM auto-unlock
  • 2.5 Use a strong LUKS passphrase, not a short PIN
  • 2.6 Keep an offline recovery key somewhere physical
  • 2.7 Encrypt backups, not just the live disk
  • 2.8 GPG-encrypt individual files for the gaps full-disk encryption doesn't cover
  • 2.9 Verify encryption actually engaged after a reboot
3Secure Communication & Remote Access10 tips

Everything in this category changes how you're allowed to reach a machine remotely — test each change from a session or console access you can fall back on, not the only connection you have to the box.

3.1 Disable SSH password authentication entirely

Example: PasswordAuthentication no in sshd_config, then systemctl restart sshd. Key-based auth alone removes an entire class of brute-force login attempts — there's simply no password to guess.

CAUTION: Confirm key-based login actually works in a second, separate terminal before you close the session you're currently using to make this change. If the key isn't set up correctly, this locks you out with no password fallback left.

`` # In sshd_config: PubkeyAuthentication yes PasswordAuthentication no PermitEmptyPasswords no ``

3.2 Disable root login over SSH

Example: PermitRootLogin no — log in as a normal user and use sudo instead, so every remote action is attributable to a specific person, not to an anonymous "root." Combine this with the password-auth change above and every login is both traceable and key-verified.

CAUTION: Make sure your non-root user is already in the sudoers group and can actually authenticate with a key before you disable root login — otherwise you can end up with a server nobody can administer remotely at all.

3.3 Use ed25519 keys instead of legacy RSA

Example: ssh-keygen -t ed25519 -C "you@example.com". Smaller, faster to verify, and it sidesteps 1024-bit RSA keys — genuinely weak, and still floating around in old scripts, tutorials, and forgotten authorized_keys files from years ago. (2048-bit RSA isn't in the same boat: NIST still rates it acceptable, with no sunset date currently in view — but ed25519 remains smaller and faster to verify regardless, so there's little reason to reach for RSA at all for a new key.)

  • 3.4 Rate-limit SSH login attempts with fail2ban
  • 3.5 Restrict SSH access by source, not just by password strength
  • 3.6 Use end-to-end encrypted messaging for anything sensitive
  • 3.7 Sign your Git commits
  • 3.8 Don't paste secrets into chat apps "just this once"
  • 3.9 Use an SSH config file instead of memorizing flags
  • 3.10 Rotate SSH keys periodically, and after any device changes hands
4System & Kernel Hardening12 tips

A few of these change what's allowed to run or connect on the machine — test on a non-critical box or a snapshot/VM first, since an overly strict policy can break a working service just as effectively as an attacker could.

4.1 Turn on AppArmor and actually check its status

Example: aa-status shows which profiles are enforcing versus merely logging. A profile stuck in "complain" mode isn't protecting anything yet — it's just taking notes; move confirmed-safe profiles to aa-enforce deliberately, one at a time.

4.2 Run systemd-analyze security on the services that matter

Example: systemd-analyze security sshd.service scores a unit's sandboxing on a 0–10 exposure scale and lists exactly which hardening directives are still missing, with suggestions — a genuinely useful starting checklist rather than a vague "harden your services" instruction.

4.3 Sandbox systemd services with capability limits

Directives like ProtectSystem=strict, NoNewPrivileges=yes, and PrivateTmp=yes shrink what a compromised service can actually reach, even if an attacker gets code execution inside it.

CAUTION: Test overrides on a copy of the service first — an overly strict sandbox can silently break a service that needs to write to a path you didn't account for, and the failure often just looks like the service refusing to start with a vague error.

`` # systemctl edit myservice.service [Service] ProtectSystem=strict ProtectHome=yes NoNewPrivileges=yes PrivateTmp=yes ``

  • 4.4 Keep unattended security updates on for headless servers
  • 4.5 Disable services you don't actually use
  • 4.6 Run a file-integrity monitor
  • 4.7 Whitelist trusted USB devices with USBGuard
  • 4.8 Audit sudo usage, don't just grant it
  • 4.9 Keep the kernel itself updated, not just userspace packages
  • 4.10 Run rootkit checks periodically
  • 4.11 Use Lynis for a full hardening audit
  • 4.12 Don't run daily workloads as root
5Browser & Application Privacy9 tips

5.1 Turn on resist-fingerprinting mode in Firefox

privacy.resistFingerprinting in about:config normalizes your browser's reported fingerprint — screen size, timezone, fonts, canvas rendering — so you blend in with thousands of other users instead of standing out as a unique, trackable configuration.

GOOD TO KNOW: This setting can break some sites in small ways (odd timezone display, blocked canvas-based features) — it's a real tradeoff between fingerprinting resistance and everyday convenience, not a free lunch.

5.2 Use per-site container tabs

Firefox's Multi-Account Containers extension isolates cookies and site data per container, so your shopping tab genuinely can't see what your banking tab is doing — and neither can the ad networks embedded on either site, since they can't correlate identifiers across the container boundary.

5.3 Sandbox desktop apps with Flatpak permissions

Example: flatpak override --nofilesystem=home org.example.App. Most Flatpak apps request far more filesystem access than they actually need by default — flatpak info --show-permissions org.example.App is worth running on anything you install, since "sandboxed" doesn't automatically mean "tightly sandboxed."

  • 5.4 Use Firejail for anything you don't fully trust yet
  • 5.5 Review browser extension permissions on a schedule
  • 5.6 Block third-party trackers at the network level
  • 5.7 Don't reuse your primary browser profile for sensitive research
  • 5.8 Check what your apps are actually phoning home to
  • 5.9 Keep JavaScript engines updated, not just the browser chrome
6Authentication & Credentials9 tips

6.1 Use a password manager, not a memorized pattern

KeePassXC (local, encrypted database, no cloud dependency) or Bitwarden (synced across devices) both beat "the same password with a number appended" by an enormous margin — a password manager lets every single account have a genuinely unique, high-entropy password without you needing to remember any of them.

6.2 Add a hardware key as a second factor

A FIDO2 key — pamu2fcfg for local login, WebAuthn for supported sites — resists phishing in a way SMS and app-based one-time codes fundamentally can't, because the cryptographic challenge is bound to the actual site's domain and can't be relayed to a fake one.

6.3 Never share a login between more than one purpose

A leaked password from an unrelated breach is only dangerous to accounts that reuse it — which, for most people, is most of them, because breaches happen to services you don't control and can't predict. A password manager removes the friction that makes reuse tempting in the first place.

  • 6.4 Set a real passphrase for sudo, disable blanket NOPASSWD
  • 6.5 Use SSH keys with a passphrase, not a bare private key
  • 6.6 Rotate credentials after anyone else has had physical access
  • 6.7 Use ssh-agent instead of typing your passphrase into scripts
  • 6.8 Check breach-notification data periodically
  • 6.9 Lock down account recovery paths as carefully as the password itself
7Secure Deletion & Digital Hygiene8 tips

Two of these tips involve commands that permanently destroy data with no undo — double-check the target device name before you run anything here, every single time.

7.1 Know that shred doesn't reliably work on SSDs

Wear leveling means the physical flash cells behind a file's logical block address move around constantly, transparently, as part of normal SSD operation. Overwriting a file "in place" with shred often never touches the actual physical data on flash storage at all — the drive just writes the new pattern to a different physical cell and marks the old one as stale.

7.2 Use full-disk encryption as the real answer for SSD deletion

Deleting the LUKS key (cryptsetup luksErase or simply destroying all key slots) is instant, verifiable, and doesn't depend on the physical quirks of the storage medium the way file-shredding tools do — cryptographic erasure sidesteps the wear-leveling problem entirely instead of fighting it.

7.3 Strip metadata before sharing photos and documents

Example: exiftool -all= photo.jpg — removes GPS coordinates, device model, and timestamps most people never realize are embedded in the file. For a whole folder at once: exiftool -all= -r /path/to/folder.

  • 7.4 Securely wipe a drive before disposal or resale
  • 7.5 Clean up temp and swap files on a schedule
  • 7.6 Check your clipboard manager for lingering secrets
  • 7.7 Empty the trash like you actually mean it
  • 7.8 Verify what "clean install" actually leaves behind
8Logging, History & Footprint Control8 tips

8.1 Control what your shell remembers

HISTCONTROL=ignorespace in your shell config lets you prefix any sensitive command with a leading space to keep that one line out of history entirely — handy for a one-off command containing a password or token you don't want sitting in ~/.bash_history indefinitely.

8.2 Know what journald is actually retaining

SystemMaxUse=200M in /etc/systemd/journald.conf caps retention by size. Check journalctl --disk-usage to see what's already piled up by default — on a long-running server it's often far more than people expect, and it's rarely been reviewed for what's actually in it.

8.3 Review auth logs for what they're actually recording

/var/log/auth.log keeps a running record of every sudo invocation, every SSH login attempt (successful or not), and every su — useful for spotting intrusions, and just as useful to anyone else who gets read access to that file, which is worth remembering when setting its permissions.

  • 8.4 Clear bash history deliberately, not by hand-editing the file
  • 8.5 Think about what your login banner is broadcasting
  • 8.6 Check what timestamps your files are carrying
  • 8.7 Be deliberate about what gets logged in the first place
  • 8.8 Remember what "private browsing" actually covers
9Physical Security & Opsec Habits9 tips

This is the category where the cheapest tips (a screen lock shortcut, a cable lock) prevent the same real-world outcomes as some of the more elaborate technical ones — don't skip the physical basics because they feel less "technical."

9.1 Lock your screen every single time you step away

loginctl lock-session bound to a keyboard shortcut removes the excuse of "it's just for a second" — the average opportunistic look-over-the-shoulder or quick USB-drop attack takes far less time than that "second" actually lasts.

9.2 Set a BIOS/UEFI password separate from your disk encryption passphrase

Without one, boot order and boot media can potentially be changed by anyone with a few unsupervised minutes and a USB stick, opening the door to boot-time attacks that happen before your disk encryption ever gets a chance to matter.

CAUTION: Write this password down and store it somewhere separate from the machine. Forgetting a BIOS/UEFI password can mean a trip to the manufacturer or, on some hardware, replacing the motherboard entirely — there's often no user-accessible reset.

9.3 Use a cable lock in shared or public spaces

Opportunistic laptop theft doesn't care how good your encryption is if the machine simply walks out the door while you're in line for coffee — a cable lock is cheap, unglamorous, and stops the single most common physical-security failure mode outright.

  • 9.4 Cover the webcam physically, not just in software
  • 9.5 Prefer a passcode over biometric unlock when crossing borders
  • 9.6 Carry a dedicated travel device for sensitive trips
  • 9.7 Use tamper-evident seals on hardware you can't watch constantly
  • 9.8 Store a spare recovery key somewhere that isn't "on the device it recovers"
  • 9.9 Treat "just this once, on someone else's computer" as a real risk
10Anonymity Tooling & Specialized Distros6 tips

10.1 Reach for Tails when you need amnesia, not just privacy

Tails boots from removable media and forgets everything on shutdown by design, routing all traffic through Tor automatically — a fundamentally different guarantee than "a privacy-focused desktop" that just happens to be configured carefully, because nothing persists between sessions unless you explicitly set up encrypted persistent storage.

10.2 Use Qubes OS when compartmentalization matters more than convenience

Separate qubes (individually isolated VMs) for banking, browsing, and work mean a compromise in one doesn't automatically become a compromise of everything — the security boundary is enforced by the hypervisor itself, not just by discipline or careful browsing habits.

10.3 Understand what Whonix actually isolates

Routing all traffic through Tor at the gateway VM level protects against a compromised workstation VM leaking your real IP even if malware gets full control of it — a meaningfully different, stronger threat model than a browser-only Tor setup, where a single browser exploit can potentially deanonymize you directly.

  • 10.4 Don't reach for an anonymity distro without an anonymity-shaped problem
  • 10.5 Match the tool to the actual adversary, not the scariest one you can imagine
  • 10.6 See the full distro rundown for the deep cuts
11Myths, Security Theater & Overkill11 tips

11.1 "chmod 777 fixes permission errors"

It does, the same way removing a smoke detector fixes it beeping. It works, right up until it very much doesn't — and by then the file or directory has usually been writable by literally anyone on the system for however long it took to notice.

11.2 Changing your SSH port isn't security, it's noise reduction

Moving from 22 to 2222 cuts down on automated scanner spam cluttering your logs. It does nothing against anyone actually targeting you specifically — a targeted attacker runs a full port scan in seconds and finds it immediately. Worth doing for your sanity and your log's signal-to-noise ratio — not for your safety.

11.3 A password with a "!" at the end isn't a strong password

Attackers know that trick too — it's one of the first substitutions any modern cracking wordlist tries. Length and genuine randomness matter far more than the handful of predictable pattern substitutions everyone, including the attacker, already expects.

  • 11.4 Antivirus software isn't doing much on a well-maintained Linux desktop
  • 11.5 Hiding your hostname doesn't hide your machine
  • 11.6 A VPN doesn't make you anonymous, it makes you someone else's problem instead of your ISP's
  • 11.7 "I'll just remember not to run that as root" is not a security policy
  • 11.8 Incognito mode is not a VPN, a firewall, or a disguise
  • 11.9 A sticker over the webcam is good opsec; a sticker over the microphone in your head is not
  • 11.10 Security through obscurity isn't worthless, it's just not sufficient
  • 11.11 The most overkill security setup in the world doesn't help if the password is still "changeme123"
The full guide, as a PDFEvery tip above is written up in full. Free, no email needed.

Related guides: 100+ Tips & Tricks — Ubuntu Server 26.04 LTS, 100+ Linux Commands. From the books: Ubuntu Server, Distilled for Ubuntu Server in depth. All free guides are in the library.