Linux
Browse all articles, tutorials, and guides about Linux
Posts
Disk Full but du Disagrees: Finding Deleted Files That Still Use Space
When df reports a full filesystem but du cannot find the bytes, an unlinked log held open by a process is often the missing space. Find the holder, release space safely, and prevent the next midnight disk-full incident.
Node.js November 2026 Security Release: How We Tracked and Patched It
Node.js 22.23.5, 24.22.3 and 26.13.1 fix 16 CVEs, seven of them high severity in HTTP/2 and TLS. Here is what was fixed, who should upgrade first, the 15-minute watcher that told us the release was out, and the nvm, pm2 and systemd steps we used to move production in minutes.
cgroup v2 memory.high Throttles, memory.max Kills: Measured on a Host Without Swap
We ran one allocating workload under memory.max, memory.high and both on a Linux 6.8 host with no swap. memory.max killed it in under half a second. memory.high did not kill it: new allocations waited, once per 64-page batch at best and once per page next to a busy neighbour on the same CPU. Here are the numbers, the kernel formula behind them, and what systemd, Docker and Kubernetes write.
Alpine OpenSSH Password Bypass (CVE-2026-123158): Check and Fix
Alpine sshd without PAM could let an attacker into accounts that have no password. Check one host or all your containers, then upgrade and restart sshd.
OpenTelemetry Collector Custom Builds: 6.5x Smaller, and What Resource Detectors Cost at Startup
We built a small Collector with ocb and started it next to the contrib release on a droplet, in two network namespaces and on a Raspberry Pi, 5 times per case. The custom build is 6.5x smaller and holds under a quarter of the memory. Cloud detectors for clouds the host is not on held startup for the full 5 s timeout, even on another cloud, and one detector stopped the Collector from starting at all.
Base64 Explained: 3 Bytes In, 4 Characters Out, Zero Secrecy
Base64 turns 3 bytes into 4 characters and hides nothing. See it in Kubernetes Secrets and JWTs, measure the 33% overhead, and fix the bugs it causes.
Node.js October 2026 Security Release: Finding Every Node You Actually Run
Node.js 22.23.4, 24.22.1 and 26.12.1 fix a Brotli decoder bug that the project says permits remote code execution, plus TLS and DNS bugs. The version bump is one line. pm2 entries, the pm2 daemon, systemd units, cron jobs and containers each keep their own Node, so here is how to find every one and prove it moved.
PHP2Shell: How to Check That Every PHP You Run Is Actually Patched
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two critical remote code execution bugs. Installing the update is the easy part. A patched Ubuntu PHP still says 8.3.6, running workers keep the old code, and 4.4 hours after the release 8 of 39 popular images still shipped a vulnerable PHP. Here is how to find the PHP you run and prove it is fixed.
Let's Encrypt Goes to 64-Day Certificates: When Does Your ACME Client Actually Renew?
Let's Encrypt moves to 64-day certificates on 10 February 2027, and its staging environment already issues them. We issued real 64-day staging certificates with certbot, acme.sh and lego and recorded when each one renews. The ARI clients renewed or scheduled their renewal around day 42. acme.sh 3.0.7 with --days 80 scheduled its renewal for day 79, 15 days after the certificate expired, and upgrading to 3.1.6 fixed that at the next check.
Ubuntu 26.10 Moves cp, mv and rm to Rust. We Ran 162 Shell Commands Through GNU and uutils to See What Changes
Ubuntu 26.10 ships on October 15 with Rust coreutils for every tool. On the same system, 150 of our 162 shell test cases gave byte-identical results with GNU and uutils. The other 12 come down to four changes that can break a script (GNU detection, cut -c, timeout -s KILL, base64 -d) and five error messages.
OpenSSH 10.6 Refuses DOMAIN\user and Weakens ssh -C. We Measured Both
OpenSSH 10.6 came out on October 6. It refuses usernames with a backslash or a dollar sign before it connects, which breaks ssh, scp, rsync, git and Ansible logins written as CORP\alice. It also cuts ssh -C to Huffman coding only, so a 32 MiB log now compresses to 21 MiB instead of 3.7 MiB. We built 10.5 and 10.6 side by side and tested 13 ways of passing a username, 4 kinds of data and 8 SSH clients.
Python 3.15 Made UTF-8 the Default. We Ran 13 Cases in Seven Linux Locales to See What Changes
Python 3.15 turns on UTF-8 mode everywhere. With container locale settings, none of our 13 encoding cases changed. On a UTF-8 server, only stdin and stdout changed. On a legacy-locale host, almost everything did, and the PYTHONUTF8=0 opt-out dropped LC_ALL=C processes to ASCII.
CVE-2026-80521: The Ubuntu Container Escape Is Not Just an Ubuntu Problem
A public exploit breaks out of default Docker and Kubernetes containers through a bug in the AF_UNIX garbage collector, and Ubuntu 24.04 and 26.04 still have no kernel fix. The same code sits in the 6.1 and 6.6 LTS kernels, where upstream has no fix either. Here is how to check any node in one command, and what to do while you wait for a patch.
Linux, Git, Docker: Why That Order Matters
Every DevOps roadmap lists the same tools. Almost none of them explain why the order is not arbitrary, or why learning Docker first makes containers feel like magic. Three steps, each one runnable in a terminal, each one making the next one obvious.
Omarchy 4 Makes the Linux Desktop Feel Like a Product, Finally
DHH's Arch-based distro shipped its biggest release in August: a full desktop shell rewrite, sub-minute installs, dual boot, and coding agents treated as system citizens. With an $8M foundation behind it and hardware vendors paying attention, Omarchy is the most serious run at the developer workstation in years.
Send an Email by Hand: The Raw SMTP Conversation (and Why You Should Not Do It in Production)
You can open a socket to a mail server and type an email one command at a time. Doing it once teaches you what every email API hides. Here is the full SMTP conversation, byte by byte, and the exact reasons production sending needs more than a telnet session.
Your Container Is Not a Security Boundary: GhostLock (CVE-2026-43499)
A 15-year-old Linux kernel bug just got a public exploit that breaks out of containers and hands any local user root on the host. GhostLock is a reminder that the container is not your security boundary, the shared kernel is. Here is what actually shrinks the blast radius.
How Docker Really Works, From docker run to the Kernel
You type docker run and a container appears. Follow the CLI, dockerd, containerd and runc down to the kernel, with the commands to watch each step. Then get clear answers on image vs container, docker run vs start, containers vs VMs, the performance cost, and when Compose is enough.
When the SSH Server Attacks the Client: libssh2 CVE-2026-55200
You spent years hardening sshd. This bug does not care. CVE-2026-55200 is a pre-auth heap overflow in libssh2 where a malicious SSH server takes over the client that connects to it, no credentials needed. And libssh2 is a client library hiding in curl, git tooling, and backup jobs all over your pipeline. Here is the bug, who is actually exposed, and how to find it in your stack.
Dirty Frag (CVE-2026-43284 + CVE-2026-43500): Local Root on Every Major Linux Distro
A two-bug chain in the Linux kernel networking subsystems lets any unprivileged local user become root in a single command. The PoC is public, the embargo broke, and not all distros have a patch yet.
CVE-2026-31431 Copy Fail: A 4-Byte Kernel Write That Escapes Containers
A new Linux kernel bug lets any unprivileged process flip 4 bytes in the page cache and break out of a container. runtime-default seccomp does not block it. Here is what to do.
5 DevOps Books Worth Reading in 2026
A curated list of DevOps books that are actually worth your time in 2026, from beginner Linux guides to production Kubernetes patterns and the SRE bible.
How to Free Up a TCP/IP Port on Linux, macOS, and Windows
Learn how to identify processes using a port and free it up by stopping the service, killing the process, or changing configuration across different operating systems. Find an available port, and close a port with ufw, firewalld or nftables.
How to Get a List of All Valid IP Addresses in a Local Network?
Discover active devices on your local network using tools like nmap, arp-scan, and native OS commands. Learn network scanning techniques for inventory management, security audits, and troubleshooting.
How do I Get Flask to Run on Port 80?
Running Flask on port 80 requires special permissions since port 80 is a privileged port. Learn the different approaches to running Flask on port 80, from using sudo to setting up reverse proxies with Nginx.
Can Two Different Sockets Share a TCP Port?
Understand how TCP port sharing works with SO_REUSEADDR and SO_REUSEPORT, when multiple sockets can bind to the same port, and the limitations you need to know.
What do PTY and TTY Mean?
TTY and PTY are interfaces for text input and output in Unix systems. Learn the difference between physical terminals (TTY), pseudo-terminals (PTY), and how they enable SSH sessions, terminal emulators, and command-line tools.
Why Does the C Preprocessor Interpret "linux" as "1"?
Discover why the word 'linux' is predefined as the constant 1 in the C preprocessor on Linux systems, and how this historical quirk can cause unexpected compilation errors.
Using ls to list directories and their total sizes
How to show directory sizes from the shell - practical commands for macOS and Linux, and why `ls` alone is not enough.
How to Connect to Network Shares with Username and Password
Learn how to mount SMB/CIFS network shares with credentials on Linux, macOS, and Windows, including persistent mounts and secure credential storage.
How to Get the Current Date, Time and Epoch Seconds in Linux and Bash
Print and format the current date and time with date, get Unix epoch seconds and milliseconds, convert between dates and timestamps, measure how long a command takes, and turn your favorite format into a custom command.
Increasing the Maximum Number of TCP/IP Connections in Linux and Monitoring Network Usage
Find the limit you actually hit, then raise it: file descriptors, the ephemeral port range, listen backlogs, TIME_WAIT and connection tracking. Then watch bandwidth per process, per connection and per interface with nethogs, iftop, nload and ss.
How to Sleep for Milliseconds in Bash and Linux
Learn how to pause script execution for fractions of a second using sleep, usleep, and other methods for precise timing in Bash scripts and command-line operations.
How to Fix SSH "Could Not Resolve Hostname" Error
Troubleshoot and fix the SSH 'nodename nor servname provided, or not known' error with DNS checks, host file configuration, and SSH config debugging.
Fix Docker 'Cannot Connect to the Docker Daemon' and 'Permission Denied' Errors
Fix 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock', permission denied on the Docker socket and on volumes, and 'denied: requested access to the resource is denied' on docker push. Learn why the docker group equals root, and how to harden a Docker host.
How to Copy, Overwrite and Symlink Files in Linux, and Get Their Full Path
Make cp overwrite without asking, copy whole directories with their hidden files, create symlinks with ln -s and get relative targets right, remove a symlink without deleting the target, and get the absolute path of any file.
What Does set -e Mean in Bash? Shebangs, sh vs bash and the Script Directory
The first lines of a Bash script decide which shell runs it, what happens when a command fails and where it finds its files. Learn what set -euo pipefail does and where it does not stop a script, which shebang to use, how sh differs from bash, and how to get the script directory.
How to Find Files Containing Specific Text on Linux
Need to locate files with specific content? Learn how to use grep, find, and other Linux tools to search through files and directories efficiently.
How to Find the IP Address of an SSH Client
Learn multiple ways to identify the IP address of clients connected to your SSH server, from environment variables to logs and active connection monitoring.
How to Recursively Grep All Directories and Subdirectories
Learn how to use grep with recursive options to search through entire directory trees efficiently, exclude directories, list only matching file names, and filter live log streams without buffering delays.
How to Find Files Using Wildcards in Linux, Exclude Directories and Count Files
Use find with wildcards to search directory trees, fix "Argument list too long", skip directories such as node_modules in find and tar, count files and lines of code, and change permissions for folders and files separately.
How to Profile C++ Code Performance on Linux
Learn how to use profiling tools like gprof, Valgrind, and perf to analyze C++ application performance and identify bottlenecks on Linux systems.
How to Permanently Set $PATH on Linux and Unix
Learn how to permanently modify your PATH environment variable on Linux and Unix systems so your custom directories persist across shell sessions and reboots, then reload .bashrc, export or delete variables, and write aliases that take parameters.
How to Simulate a Slow Internet Connection for Testing
Throttle and break the network on purpose: tc netem on Linux, Network Link Conditioner on macOS, Clumsy on Windows, browser DevTools, Toxiproxy for a single service, and three ways to create a connection timeout.
How to Copy Command Output Directly to Your Clipboard in Linux
Pipe command output to the clipboard with wl-copy on Wayland, xclip or xsel on X11, pbcopy on macOS and clip.exe on WSL. Paste it back, write clipboard functions for scripts, and copy to your local clipboard over SSH.
How Does cat << EOF Work in Bash?
Understand heredocs in Bash - the << EOF syntax that lets you write multi-line strings, create files with embedded content, and pass complex input to commands.
How to Prompt for Yes/No/Cancel Input in a Linux Shell Script
Learn different techniques for creating interactive prompts in your shell scripts, from simple yes/no confirmations to three-way choices with proper input validation and user-friendly interfaces.
How to Change the Output Color of Echo and Fix Newlines in Bash
Print colored text in a Linux terminal with ANSI escape codes or tput, turn colors off when output is not a terminal, and fix echo when it prints a literal \n instead of a new line.
How to Check if a File, Directory, Variable or Command Exists in Bash
The Bash tests you use in almost every script: check if a directory or file exists, if a variable is set or empty, if a string contains a substring, how to compare text without case, and if a program is installed.
What Does "2>&1" Mean in Linux and Bash?
Learn what the 2>&1 redirection operator means, how stdout and stderr work, and how to send all output to a file, to the screen and a file with tee, to a protected file with sudo, or only to stderr.
How to Loop Through File Lines, Arrays and Number Ranges in Bash
Read a file line by line without losing spaces or backslashes, keep variables set inside the loop, loop safely over file names, iterate over arrays, and loop over a number range stored in variables.