05 - Linux

All About Linux!

Installing Official Speedtest CLI by Ookla on Debian Linux

Date: June 3, 2025
Category: Networking / Monitoring
Backlink: N/A


Description

This guide explains how to install the official Speedtest CLI by Ookla on a Raspberry Pi 5 running Debian Bookworm. Unlike the legacy speedtest-cli, this version offers more accurate and reliable results and is the preferred tool for benchmarking internet speed.

You can get the latest repo here if it changes:
https://www.speedtest.net/apps/cli


Installation Steps

1. Add the Ookla repository

curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash

2. Install the Speedtest CLI

sudo apt install speedtest

Note: If a file conflict occurs with speedtest-cli, you may need to rename or uninstall the legacy version.


Usage

To run a test:

speedtest

Sample output:

Speedtest by Ookla

     Server: Contabo - St. Louis, MO
        ISP: Spectrum
    Latency: 34.91 ms
   Download: 29.85 Mbps
     Upload: 39.39 Mbps

ย Notes

My Custom Linux Scripts Index

This page tracks custom scripts Iโ€™ve written or installed on my systems, primarily placed inย /usr/local/bin for global use. Each script is either a utility, security tool, or automation helper I use regularly.


๐Ÿ“ Script Directory: /usr/local/bin

This directory is in the system $PATH and allows me to run any executable script from any location in the terminal.

To make a script globally accessible:

sudo mv myscript.sh /usr/local/bin/myscript
sudo chmod +x /usr/local/bin/myscript

Then simply run:

myscript

๐Ÿ“œ Script List

Script Name Description Created / Added On
bookstack-backup Creates and compresses daily BookStack backup May 4, 2025
update-syncthing-ufw Dynamically updates UFW with resolved DDNS IP May 10, 2025
syncthing-log-summary Summarizes UFW log attempts on Syncthing ports May 10, 2025
fail2ban-ip-lookup Enriches banned IPs with GeoIP, PTR, AbuseIPDB May 12, 2025
clear-fail2ban-cache Removes stale lookup results for a clean run (Planned)
mygreeting Test script: echoes a message from anywhere (Planned)

๐Ÿง  Tips


Make a script executable:

chmod +x scriptname

Test if a command is globally accessible:

which scriptname

Check your system PATH:

echo $PATH


Top 25 Linux Commands I Use Weekly

A practical list of Linux commands I personally use most often during system monitoring, server administration, scripting, and troubleshooting.
Use this list as a quick reference or jump-off point for deeper Linux command mastery.


๐Ÿ”ง System Monitoring & Info

Shows real-time process activity, CPU usage, memory, and system load.

top

Interactive version of top with easier navigation and color-coded output.

htop

Displays RAM usage with human-readable units.

free -h

Shows disk usage by mounted partitions in human-readable format.

df -h

Shows size of each item in the current directory.

du -sh *

Displays how long the system has been up and the current load.

uptime

Prints kernel version and system info.

uname -a

Displays the current user name.

whoami

๐Ÿ” Networking & Firewall

Displays network interfaces and IPs.

ip a

Shows the routing table.

ip r

Shows UFW rules with index numbers for deletion.

sudo ufw status numbered

Allows incoming SSH connections via UFW.

sudo ufw allow 22/tcp

Lists all listening ports (older tool).

sudo netstat -tuln

Modern alternative to netstat for listing open ports.

ss -tuln

Tests network connectivity with ICMP packets.

ping 1.1.1.1

๐Ÿ“ File & Directory Management

Lists files including hidden files and sizes.

ls -lah

Changes the current directory.

cd /path/to/directory

Copies a file or folder.

cp source destination

Renames or moves a file or folder.

mv oldname newname

Removes a directory and all its contents (โš ๏ธ dangerous).

rm -rf /path/to/folder

Edits files using a simple terminal-based editor.

nano filename.txt

Displays contents of a file.

cat filename.txt

Follows a log file in real time.

sudo tail -f /var/log/syslog

โš™๏ธ Package Management (Debian/Ubuntu)

Updates package list and installs available upgrades.

sudo apt update && sudo apt upgrade -y

Installs a new package by name.

sudo apt install packagename

Searches installed packages for a string.

dpkg -l | grep keyword

How I Back Up My VPS with Syncthing

This guide documents how I use Syncthing to back up my VPS's critical BookStack data folder (/opt/bookstack_backups) to my personal workstation automatically and securely.


๐Ÿ“‚ Backup Directory

I use a dedicated folder on my VPS for storing compressed BookStack backups:

/opt/bookstack_backups

Each backup is generated nightly via a cron job and includes both the database and uploaded content.


๐Ÿ”„ Syncthing Folder Setup

On both the VPS and my workstation:

To enable and start the system-wide Syncthing service (replace yourusername):

sudo systemctl enable syncthing@yourusername.service
sudo systemctl start syncthing@yourusername.service

To verify the service is running:

systemctl status syncthing@yourusername.service

โš ๏ธ Tip: If Syncthing is installed system-wide or runs under root, use the appropriate service name or create a dedicated user account just for it.


๐Ÿ” UFW Firewall Rule with DDNS Lockdown

To limit Syncthing access to my workstation only, I use a dynamic DDNS-resolved UFW rule.

Example IP update script:

/opt/scripts/update-syncthing-ufw.sh

This script:

Example UFW rule:

sudo ufw allow from 123.45.67.89 to any port 22000 proto tcp

Blocked access attempts are logged and managed with Fail2Ban.


๐Ÿ“œ Backup Cron Job

The backup script runs daily at 2:00 AM using cron.

Crontab entry:

0 2 * * * /opt/scripts/bookstack-backup.sh

Script actions:


๐Ÿ“ Local Redundancy Strategy

Once synced to my local system:

tar -xzvf bookstack-backup-YYYY-MM-DD.tar.gz -C /restore/location

๐Ÿ› ๏ธ Supporting Scripts

These scripts make the entire backup and security process seamless:

Script Name Purpose
bookstack-backup.sh Creates nightly backups
update-syncthing-ufw.sh Updates UFW with resolved DDNS IP
syncthing-log-summary.sh Parses and displays UFW-blocked Syncthing traffic
bookstack-logrotate.conf Handles log file cleanup

๐Ÿง  Key Takeaways

Top Self-Hosted Applications to Run on Linux Servers

This list showcases powerful and privacy-friendly applications you can host on your own Linux server - perfect for replacing third-party services and building your own digital infrastructure. These apps can run on bare-metal servers, virtual machines, or Docker containers.


๐Ÿ“š 1. BookStack


โ˜๏ธ 2. Nextcloud


๐Ÿ“ 3. Obsidian Sync / Remote Vault Hosting


๐Ÿ“ฆ 4. Docker / Portainer


๐Ÿ“ˆ 5. Grafana + Prometheus


๐Ÿ›ก๏ธ 6. Pi-hole


๐Ÿ“ง 7. Mail-in-a-Box


๐Ÿ“ก 8. Uptime Kuma


๐Ÿ”‘ 9. Vaultwarden (Bitwarden alternative)


๐ŸŽ™๏ธ 10. Jitsi Meet


๐Ÿ“บ Bonus Picks

App Purpose
Gitea Lightweight self-hosted Git service (GitHub alternative)
Plex / Jellyfin Self-hosted media server for movies, music, and TV
Home Assistant Smart home automation platform
Homer / Dashy Custom startpages or dashboards for organizing links
FreshRSS / Miniflux Private RSS feed reader

๐Ÿงฉ Summary

These apps are perfect for:


๐Ÿ“ก Linux Tools for Infrastructure Monitoring

This page covers the best open-source tools for monitoring the health, performance, and security of your Linux infrastructure - whether you're managing a single server or an entire fleet of systems and services.


๐Ÿ–ฅ๏ธ 1. Grafana


๐Ÿ” 2. Prometheus


๐Ÿง  3. Netdata


๐Ÿ“Š 4. Nagios Core / Icinga


๐Ÿ” 5. Fail2Ban


๐Ÿ“ˆ 6. Uptime Kuma


๐Ÿงฐ 7. Cockpit


๐Ÿ“ฆ 8. Monit


๐Ÿ“œ 9. Logwatch / Logrotate


๐Ÿ› ๏ธ 10. Elastic Stack (ELK: Elasticsearch, Logstash, Kibana)


๐Ÿงฉ Summary

These tools help monitor:

They range from real-time dashboards (Netdata, Grafana) to reactive protection tools (Fail2Ban) and enterprise-level observability stacks (ELK, Nagios)

๐Ÿง‘โ€๐Ÿ’ป Security-Focused Linux Distributions for Anonymous Browsing & Penetration Testing

Anonymous Browsing & Lightweight Live OSes

1. Tails (The Amnesic Incognito Live System)


2. Knoppix


3. Puppy Linux


4. Tiny Core Linux


Advanced Privacy & Security Operating Systems

5. Qubes OS


6. Whonix


Penetration Testing & Digital Forensics Distros

7. Kali Linux


8. Parrot Security OS


Next Steps

You can boot most of these distros from a USB stick using Rufus (Windows) or dd (Linux/macOS). Some, like Tails and Qubes, have specific installation instructions, so be sure to follow their official guides.

๐Ÿง‘โ€๐Ÿ’ป Lightweight Linux Distributions for Reviving Old Hardware

This page highlights Linux distributions specifically designed to run efficiently on older or resource-constrained hardware. These systems are ideal for breathing new life into legacy laptops, desktops, or low-spec devices while maintaining decent usability, speed, and sometimes even modern software support.


โšก 1. Puppy Linux


โšก 2. Tiny Core Linux


โšก 3. antiX


โšก 4. Bodhi Linux


โšก 5. LXLE


โšก 6. Slax


โšก 7. Linux Lite


๐Ÿ’ก Summary

These distributions are excellent for:

๐Ÿง‘โ€๐Ÿ’ป Beginner-Friendly Linux Distributions for Daily Use

This page highlights Linux distributions that are particularly well-suited for new users transitioning from Windows or macOS. These distros prioritize ease of use, polished interfaces, large communities, and reliable long-term support.


๐ŸŒŸ 1. Linux Mint


๐ŸŒŸ 2. Ubuntu


๐ŸŒŸ 3. Zorin OS


๐ŸŒŸ 4. elementary OS


๐ŸŒŸ 5. Pop!_OS


๐ŸŒŸ 6. Fedora Workstation


๐ŸŒŸ 7. Manjaro Linux


๐Ÿ” Summary

These distros are excellent for:

๐Ÿ‘จโ€๐Ÿ’ป Linux Distributions for Developers

This page outlines Linux distributions that are particularly developer-friendly โ€” whether you're writing code, compiling software, managing containers, or deploying apps. These distros emphasize performance, customizability, and access to cutting-edge development tools.


๐Ÿ› ๏ธ 1. Pop!_OS


๐Ÿ› ๏ธ 2. Fedora Workstation


๐Ÿ› ๏ธ 3. Arch Linux (and Manjaro)


๐Ÿ› ๏ธ 4. Ubuntu (or Ubuntu Minimal)


๐Ÿ› ๏ธ 5. Debian


๐Ÿ› ๏ธ 6. openSUSE Tumbleweed


๐Ÿ› ๏ธ 7. NixOS


๐Ÿ” Summary

These developer-friendly distros are ideal for:


๐ŸŽจ Linux Distributions for Media & Content Creation

This page highlights Linux distros tailored for creators โ€” including video editors, graphic designers, audio producers, and 3D artists. These distros come pre-equipped or are optimized for creative workflows, often featuring real-time kernels, pro-grade multimedia tools, and excellent hardware support.


๐ŸŽฅ 1. Ubuntu Studio


๐ŸŽต 2. AV Linux


๐Ÿ–ผ๏ธ 3. Fedora Design Suite


๐ŸŽฌ 4. KXStudio (repositories + tools)


๐ŸŽฎ 5. Apodio (Audio Production)


โœ๏ธ 6. Arch/Manjaro with Custom Creative Setup


๐Ÿ–Œ๏ธ Summary

These distros are ideal for:


๐ŸŽฎ Gaming on Linux: Best Distributions for Gamers

This guide lists Linux distributions optimized or commonly used for gaming โ€” whether you're running native Linux titles, emulating consoles, or using Proton via Steam. These distros focus on performance, compatibility, graphics support, and ease of use for gamers.


๐Ÿ•น๏ธ 1. Pop!_OS


๐Ÿ•น๏ธ 2. SteamOS (HoloISO)


๐Ÿ•น๏ธ 3. Garuda Linux (Gaming Edition)


๐Ÿ•น๏ธ 4. Manjaro


๐Ÿ•น๏ธ 5. Ubuntu / Ubuntu GamePack


๐Ÿ•น๏ธ 6. Fedora Games Spin


๐Ÿ•น๏ธ 7. Batocera.linux (Bonus: Retro Gaming Console)


๐ŸŽฏ Key Tools & Technologies for Gaming on Linux


๐Ÿงฉ Summary

These distros are ideal for:


๐Ÿ–ฅ๏ธ Best Linux Distributions for Servers & Self-Hosting

This guide highlights Linux distributions best suited for servers โ€” whether you're running a home lab, self-hosting services, deploying to the cloud, or managing enterprise infrastructure. These distros are chosen for their stability, performance, long-term support, and wide compatibility.


๐Ÿข 1. Debian


โ˜๏ธ 2. Ubuntu Server (LTS)


๐Ÿง 3. AlmaLinux / Rocky Linux


๐Ÿณ 4. openSUSE Leap / MicroOS


๐Ÿ”ง 5. Arch Linux (For Custom Server Builds)


๐Ÿงฑ 6. Proxmox VE (Hypervisor)


๐Ÿงช 7. Red Hat Enterprise Linux (RHEL)


๐Ÿ’ก Bonus: Lightweight Headless Distros


๐Ÿงฉ Summary

These Linux server distros are ideal for: