Taming Disk Space Usage with btrfs Snapshots and Automatic Pruning

Introduction to btrfs Snapshots

I’ve been using btrfs for years, and one of its most powerful features is its ability to create snapshots. These are read-only copies of a subvolume at a particular point in time, which can be used for backups, testing, and even recovering from accidental file deletions or modifications. Don’t bother with other file systems if you need this level of flexibility.

Creating Snapshots

To get started with btrfs snapshots, you’ll first need to ensure that your system is using btrfs. Run lsblk -f and look for the btrfs label. If you’re using btrfs, creating a snapshot is straightforward:

[Read More]

Taming SSH Config Chaos: Organizing Your SSH Client Settings for Multiple Servers and Identities

Taming SSH Config Chaos

If you’re like me, you’re constantly juggling multiple servers and identities. Managing SSH connections can be a real headache, especially when dealing with different usernames, ports, and private keys. I’ve seen this go wrong when you have to remember a dozen different connection settings. The real trick is to organize your SSH client settings in a way that makes sense for your workflow.

Understanding SSH Config Files

The SSH client configuration is stored in the ~/.ssh/config file. This is where you define settings for your SSH connections, such as hostname, username, port, and private key. By default, the SSH client looks for this file and applies the settings. To get started, create a new ~/.ssh/config file using your favorite text editor:

[Read More]

Using SSH to Tunnel Traffic Through a Jump Host for Secure Access to a Remote Network

Introduction to SSH Tunneling

I’ve seen this go wrong when people try to access remote networks without using a secure method - that’s where SSH tunneling comes in. This technique leverages an intermediate host, known as a jump host, to securely access remote networks. It’s particularly useful when direct access is restricted due to firewall rules or network policies. By using SSH to tunnel traffic through a jump host, you can establish a secure connection to a remote server or network, even if direct access is not possible.

[Read More]

Using Third-Party Repositories Without Polluting Your Package Manager

Introduction to Third-Party Repositories

I’ve seen this go wrong when Linux users need a specific package that’s not available in their default repositories. That’s where third-party repositories come in – they provide additional packages that can enhance the functionality of your system. However, adding these repositories can sometimes lead to version conflicts and dependency issues, which can be a real headache.

Understanding the Risks

Before adding a third-party repository, it’s crucial to understand the potential risks. When you add a repository, you’re essentially trusting the repository maintainer to provide secure and compatible packages. If the repository contains malicious or outdated packages, it can compromise the security and stability of your system. I’ve noticed that several high-profile incidents in 2025 highlighted the importance of verifying the integrity of third-party repositories. Don’t bother with repositories that don’t have a clear track record of providing secure packages.

[Read More]

Using SSH Keys with Multiple Identities and Agents for Simplified Remote Access

Introduction to SSH Keys and Agents

I’ve seen many Linux users struggle with managing multiple remote systems, but SSH keys and agents can make a huge difference. By using SSH keys, you can authenticate to remote servers without entering a password, making it easier to manage multiple systems. In practice, this means you can quickly switch between systems without having to remember a bunch of passwords.

Generating SSH Keys

To start using SSH keys, you need to generate a key pair on your local system. I usually start with the ssh-keygen command to generate a key pair:

[Read More]

Using pgrep and pkill to Simplify Process Management and Avoid Common Mistakes with background Tasks

Introduction to pgrep and pkill

When I’m managing background tasks and processes in Linux, I always reach for pgrep and pkill. These two commands are often overlooked, but they’re incredibly useful for searching for and managing processes by name. I’ve seen this go wrong when people use ps with grep - it’s just not as precise. With pgrep and pkill, you can avoid common mistakes when dealing with background tasks.

[Read More]

Taming Log Rotation: Preventing Disk Space Issues with systemd-journald and Log File Management

Introduction to Log Rotation

Log rotation - it’s one of those tasks that’s easy to overlook, but can quickly become a major headache if you don’t stay on top of it. I’ve seen this go wrong when log files consume all the available disk space, bringing a system to its knees. With many Linux distributions now using systemd-journald as the default logging mechanism, understanding how to manage log rotation is more important than ever.

[Read More]

Taming Log Rotation: Strategies for Preventing /var/log Overflow on Busy Systems

Introduction to Log Rotation

I’ve seen log files grow out of control and bring down entire systems, so log rotation is something I take seriously. It’s a crucial aspect of Linux system maintenance, ensuring that log files don’t consume all available disk space. On busy systems, logs can fill up quickly, leading to issues with system performance and even causing services to fail.

Understanding Log Rotation

Log rotation involves periodically switching out log files, typically by renaming the current log file and starting a new one. This process can be configured to occur at set intervals, such as daily or weekly, and can also be triggered by the size of the log file. Most Linux distributions come with a log rotation system pre-configured, often using the logrotate utility. Don’t bother with manual log rotation unless you have a specific reason to do so - logrotate is a well-tested and reliable tool.

[Read More]

Using systemd-resolved with Multiple DNS Servers and Split Horizon DNS

Introduction to systemd-resolved

I’ve been using systemd-resolved for a while now, and I have to say, it’s a game-changer when it comes to managing DNS resolution on Linux systems. As of 2026, it’s become a crucial component in many Linux distributions, including Ubuntu, Debian, and Fedora. In this article, I’ll walk you through how to use systemd-resolved with multiple DNS servers and split horizon DNS, including some practical examples and troubleshooting notes.

[Read More]

Taming Dependency Chaos: Using apt-mark to Pin Packages in Debian-Based Systems

Introduction to Dependency Management

As someone who’s spent years running Linux systems, I can tell you that dependency management is crucial for maintaining a healthy and stable system. You’re probably already familiar with keeping your packages up to date, but sometimes you need to pin specific packages to prevent them from being updated. This can help maintain system stability or prevent potential security issues. In this article, I’ll walk you through how to use apt-mark to pin packages in Debian-based systems.

[Read More]