Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Explore BestHub

#linux

RSS feed
Follow or choose interest 7-day signal and related keywords

Latest articles

500 articles in the current browsing window, ordered by publication date.

149 Essential Shell Scripts for Sysadmins – Keep Them Handy

This article provides a curated collection of 149 practical Bash scripts for Linux system administrators, covering common tasks such as locating zombie processes, removing empty files, calculating sums and ranges, formatting dates, retrieving MAC addresses, checking leap years, sorting numbers, and more, with each example presented as ready‑to‑run code.

Using tcpdump to Diagnose Client‑Server Communication Failures

This guide shows how to use tcpdump on Linux to verify whether a client actually sent packets, whether they reached the server, how the server responded, and where a TCP connection was closed, by defining the problem, selecting interfaces, applying narrow BPF filters, capturing key handshake packets, handling TLS, HTTP, UDP, DNS, ICMP, container and Kubernetes environments, and preserving evidence with proper file management.

Should New Engineers Pick MCU or Linux? Real Advice from a Chip‑Company Driver Engineer

The article compares MCU‑focused and Linux‑based embedded development paths, detailing job duties, market demand, salary progression across experience levels and cities, and offers concrete timeline and skill‑building recommendations to help beginners choose the most suitable career direction.

Can You Recover Files Deleted with rm ‑rf? What Works, What Fails, and How to Respond

The article explains that occasional recovery of rm ‑rf deletions is possible, but no single command guarantees full restoration; it outlines the Linux kernel behavior, immediate containment steps, how to examine backups, snapshots, open file descriptors, block‑level imaging, filesystem‑specific tools, verification, and post‑recovery best practices for production environments.

Why SafeLine’s 21.7K‑Star Open‑Source WAF Can Protect Your Exposed Site

SafeLine is a self‑hosted open‑source WAF with over 21,000 GitHub stars that bundles common web‑attack defenses, CC and bot mitigation, dynamic HTML/JS protection, and identity verification, offering a visual security console and simple Linux/Docker deployment for indie developers and small teams.

Why STL Containers Crash in Linux Shared Memory: Underlying Causes Explained

The article analyzes why placing STL containers such as std::map, std::string, or std::vector directly in Linux shared memory leads to segmentation faults, detailing memory continuity, cross‑process pointer invalidation, and lifecycle issues, and then presents safe alternatives like fixed‑size arrays, manual memory management, and Boost.Interprocess.

Macrokernel vs Microkernel Explained: How OS Kernels Manage Hardware Resources

The article explains that an operating system kernel orchestrates all hardware resources, compares macrokernel designs like Linux that place scheduling, memory, file system, networking, and drivers in a single privileged space for speed, with microkernel designs that isolate most services in user‑mode processes, highlighting trade‑offs in performance, reliability, and modern hybrid approaches.

How to Respond When Your Server Is Brute‑Force Attacked: Practical SSH Hardening Guide

When a public server shows a flood of "Failed password" entries and rising SSH connections, this guide walks you through distinguishing brute‑force attempts from actual compromise, gathering immutable evidence, applying immediate network and host safeguards, hardening OpenSSH configuration, managing keys, deploying fail2ban, and verifying the hardened system without losing access.

Network Troubleshooting with tcpdump & Wireshark: Step‑by‑Step Guide and Ready‑to‑Use Scripts

This comprehensive guide walks you through using tcpdump and Wireshark for network fault isolation, covering core concepts, capture filters, detailed analysis techniques, performance tuning, expert information interpretation, automation scripts, and best‑practice recommendations for efficient packet‑level troubleshooting.

Common MySQL Connection Errors and Step‑by‑Step Troubleshooting Guide

MySQL connection failures are among the most frequent issues for developers and operators; this article systematically walks through typical error messages, explains how to collect relevant information, runs layered command checks, analyzes evidence, identifies root causes such as socket problems, bind‑address limits, host whitelist mismatches, authentication failures, connection‑limit exhaustion, and packet timeouts, and provides concrete fix and verification procedures for on‑premise, Docker, and Kubernetes deployments.

Systematic Root‑Cause Analysis for NFS Mount Failures

This guide presents a systematic, layer‑by‑layer methodology for diagnosing and resolving NFS share mount failures, covering version differences, architecture layers, key daemons, RPC mechanisms, common error messages, detailed server and client checks, firewall and SELinux considerations, performance tuning, high‑availability setups, and monitoring.

Can You Recover Files After an rm -rf Mistake? What Works and What Doesn’t

The article explains that while some data deleted with rm -rf can be recovered, no command guarantees full restoration; it outlines a step‑by‑step process for Linux production environments, from stopping writes and gathering evidence to using backups, snapshots, open‑file extraction, block‑level imaging, and verification.

What Hidden Costs Does C++ new Add to Heap Allocation?

The article reveals that using C++ new or malloc is far from cost‑free, detailing how Linux virtual address space, system‑call overhead, memory‑header metadata, fragmentation, and page‑fault latency all contribute to hidden performance penalties, and it offers concrete techniques such as stack allocation, memory pools, restrained PImpl usage, and startup pre‑allocation to mitigate these costs.

Run Linux Containers Natively on Windows Without Docker: A Hands‑On Guide to WSL Containers

Microsoft’s WSL Containers, now in public preview, embed a Docker‑compatible container runtime directly into WSL 2, letting Windows developers launch OCI images with familiar commands without installing Docker Desktop, while the article walks through installation, core components, command mapping, performance benchmarks, feature gaps and current limitations.

Essential Port Connectivity Troubleshooting: A Complete Step‑by‑Step Guide

This guide walks you through a systematic, seven‑layer approach to diagnosing port connectivity failures on Linux systems, covering service listening checks, local firewall rules, SELinux policies, network path analysis, cloud security groups, and application‑level protocols, with concrete commands, scripts, case studies, best‑practice recommendations, and monitoring tips.

select, poll, and epoll: What’s the real difference? A deep dive into I/O multiplexing

This article explains the concepts of synchronous vs. asynchronous and blocking vs. non‑blocking I/O, outlines the five Unix I/O models, and then compares select, poll, and epoll—including their internal mechanisms, performance trade‑offs, edge‑ and level‑triggered modes, and why epoll is considered the solution to the C10K problem.

10 Essential Linux Commands to Quickly Diagnose 80% of Production Issues

This guide presents a systematic, ten‑step Linux command workflow—from overall system health to process, I/O, and log analysis—helping operators quickly determine whether a problem persists, which resource (CPU, memory, disk, network) is affected, and whether enough evidence exists to safely remediate.

Step‑by‑Step Guide to Diagnose 100 % CPU on a Linux Server

When a Linux server’s CPU spikes to 100 %, this article walks through a systematic investigation—from defining what “CPU 100 %” really means, gathering timestamps and metrics, using tools like top, mpstat, vmstat, pidstat, sar, perf, and strace, to tracing processes, threads, containers, and Kubernetes, building an evidence chain, applying low‑risk fixes, and verifying the resolution.

Mastering TCP Handshake, Four‑Way Termination, and Common Faults

This article breaks down the TCP three‑way handshake and four‑way close, explains what each state means, and provides a step‑by‑step troubleshooting guide with concrete Linux commands, packet captures, and practical tips for diagnosing timeouts, refusals, retransmissions, and other common connection problems.

Boost Nginx Performance: Scaling from Thousands to Ten‑Thousands RPS

The article presents a reproducible Nginx performance‑tuning workflow that starts with defining a baseline and acceptance criteria, measures CPU, file‑descriptor, upstream and disk limits, then incrementally adjusts worker settings, systemd limits, keepalive, buffering and compression, while using gray‑scale deployment and safe rollback.

Kernel Perspective: Accelerating C++ File Transfer via System Call Optimizations

The article explains why conventional read/write loops cause excessive user‑kernel switches and data copies that inflate CPU usage and limit throughput for large or high‑frequency file transfers, and it presents zero‑copy and asynchronous I/O techniques with complete C++ examples to eliminate these bottlenecks.

Mastering Rsync Incremental Backups: Configuration, Optimization, and Practical Implementation

This guide walks through the fundamentals of rsync incremental backups, explaining the delta algorithm, file comparison rules, optimal parameter choices, real‑world performance comparisons, and step‑by‑step scripts for installation, daily cron jobs, link‑dest rotation, real‑time syncing with inotify, and robust monitoring and error handling.

Why Do Docker Containers Keep Restarting? A Step‑by‑Step Investigation to Find the Root Cause

The article explains that frequent Docker container restarts are driven by the restart policy, not the underlying issue, and provides a systematic method—collecting container state, logs, events, exit codes, OOM flags, health‑check results, and restart policy details—to pinpoint the true cause before applying targeted fixes.

How to Diagnose Network Packet Loss: Practical Steps from ping to tcpdump

This guide explains how to systematically investigate network packet loss on Linux by collecting timestamps, routing, interface and kernel statistics, using ping, tracepath, curl, netstat, ss, nstat, ip, ethtool, nftables/iptables, and tcpdump on both ends, then narrowing the failure scope, fixing MTU, conntrack, soft‑interrupt or firewall issues, and validating the fix with metrics and roll‑back procedures.

Why WSL Never ‘Boots’: 7 Core Differences Between WSL and Standard Ubuntu Startup

The article explains how standard Ubuntu boots through BIOS, GRUB, kernel and systemd, then contrasts this with WSL 1’s syscall translation layer and WSL 2’s lightweight VM, detailing seven fundamental differences—including trigger, firmware, init process, lifecycle, UI, networking and file system—highlighting why WSL starts in seconds.

One‑Stop Linux Privilege Escalation Toolkit Covering 24 Vulnerabilities Across 7 Architectures

lpe-toolkit is a multi‑architecture Linux privilege‑escalation toolkit that bundles 24 exploits across seven CPU architectures, automatically detects kernel versions to filter patched bugs, offers pre‑compiled binaries for amd64, multiple execution modes, and practical use cases for red‑team testing, incident response, and security research.

How I Optimized Nginx to Double My Site’s Concurrency

The article walks through a systematic Nginx performance tuning process that starts with baseline load testing, identifies bottlenecks in worker processes, connection limits, I/O and buffering, and applies targeted configuration changes—such as auto workers, keep‑alive tuning, gzip, and proxy buffers—resulting in a three‑fold increase in concurrent request handling.

10 Essential System Commands Every Ops Engineer Should Master

This guide explains why core Linux commands are indispensable for ops engineers, categorizes them into monitoring, networking, disk analysis, text processing and service management, and provides detailed usage examples, troubleshooting scenarios, and decision‑tree guidance for effective system administration.

Exploring Host Security with eBPF: Building a Deep Kernel‑Level Monitoring Loop

This article examines how eBPF can reshape host security by providing kernel‑level visibility, low‑overhead real‑time monitoring, and a closed‑loop architecture that improves process and network data capture, compares performance against Netlink, and discusses stability and emergency handling mechanisms.

Exploring Host Security with eBPF: Building a Deep Kernel‑Level Monitoring Loop

This article examines how eBPF can reshape host security by providing kernel‑level visibility, low‑overhead real‑time monitoring, and a closed‑loop architecture that improves process and network data capture, demonstrates higher audit success rates than Netlink, and outlines performance, stability, and emergency‑handling mechanisms.

Practical Guide to Diagnosing and Resolving Linux Disk Space Exhaustion

This article provides a step‑by‑step, command‑driven methodology for identifying the five root causes of full disk space on Linux systems—block exhaustion, inode depletion, deleted‑but‑still‑held files, reserved space, and filesystem corruption—and offers concrete remediation techniques, automation scripts, and best‑practice recommendations.

Mastering Linux Server Time Synchronization with NTP and Chrony: Best Practices

This guide explains why time synchronization is a critical yet often overlooked part of Linux operations, outlines common failure scenarios, and provides a step‑by‑step methodology for configuring, verifying, and troubleshooting NTP/chrony across physical servers, virtual machines, containers, and Kubernetes clusters.

How SMT Hurts Low‑Latency High‑Frequency Trading and How to Disable It on AWS

The article explains why Simultaneous Multi‑Threading (SMT) degrades deterministic low‑latency performance in high‑frequency trading, details the resource contention and unpredictability it introduces, and provides step‑by‑step instructions for disabling SMT on AWS instances and verifying the change.

Building a Basic Monitoring System from Zero: How to View CPU, Memory, Disk, and Network

This article walks you through setting up a complete monitoring stack with Prometheus, node_exporter, Grafana and Alertmanager, explains how to interpret the four core dimensions—CPU, memory, disk and network—using a structured troubleshooting workflow, and provides real‑world case studies, scripts and best‑practice recommendations.

Essential Linux System Security Configurations You Must Know

This guide details fourteen essential Linux security hardening steps—including shared account checks, account lock policies, root remote‑login restrictions, password complexity and aging, critical directory permissions, logging, SSH hardening, unnecessary service removal, Ctrl‑Alt‑Del disabling, and patch installation—targeted at Red Hat AS 3/4 systems.

Using tcpdump to Pinpoint Online Network Anomalies

This guide explains how tcpdump, built on libpcap and the kernel BPF filter, can capture packets at the network stack, compares it with Wireshark, shows practical filtering syntax, performance considerations, typical use‑cases such as TCP retransmission, DNS timeouts and TLS handshake failures, and provides scripts and best‑practice recommendations for production‑grade troubleshooting.

10 Rookie Ops Mistakes You Must Avoid – A Complete Checklist

This guide walks ops newcomers through the ten most common pitfalls—from accidental rm‑rf deletions and mis‑configured firewalls to unsafe chmod usage—and provides concrete remediation steps, ready‑to‑run shell scripts, best‑practice checklists, and monitoring setups to keep production environments stable and secure.

Practical Guide to Diagnosing and Fixing NFS Mount Failures

This guide explains the NFS protocol, common mount failures, five root‑cause categories, step‑by‑step installation, configuration, verification, detailed error analysis, real‑world case studies, performance tuning, automation scripts, best‑practice recommendations and monitoring techniques for reliable NFS deployments on Ubuntu 24.04 and Rocky Linux 9.5.

Linux Security Hardening in Practice: 20 Essential Configurations Explained

This comprehensive guide walks you through Linux system hardening by outlining default settings, common pitfalls, and a step‑by‑step checklist of 20 critical configurations covering account policies, SSH, firewall, kernel parameters, file permissions, and audit logging, complete with verification commands, rollback procedures, and real‑world case studies.

Memory Leak Postmortem: Combining free, smem, pmap, and perf for Effective Diagnosis

When a thumbnail service experienced sudden latency spikes and OOM kills shortly after a new release, the author walks through a systematic investigation using free, smem, pmap, and perf to distinguish true memory leaks from page‑cache or shared‑page artifacts, pinpoint the native decoder buffer issue, and outline remediation steps.

From Zero to One: Setting Up My Personal Brand Infrastructure with a Cloud Server

The author explains why a programmer needs a personal blog and technical brand, then details the criteria for choosing a cloud server—price, resources, familiarity, and future expandability—and describes the selection of a 4‑core, 8 GB, 40 GB, 2 Mbps instance as the foundation for a maintainable, extensible personal infrastructure.

Hands‑On KVM Virtualization: Build an Enterprise‑Grade Private Cloud Platform

This guide walks through the fundamentals of KVM virtualization, compares full and para‑virtualization, details hardware and software requirements, and provides step‑by‑step commands for preparing the host, configuring storage, networking, libvirt, creating and managing VMs, implementing best practices, troubleshooting, monitoring, and backup for a production‑ready private cloud.

Why Do Most Tech Professionals End Up Switching from Windows to Linux?

The article explains that ordinary users stick with Windows or macOS because of familiarity and convenience, while tech professionals gravitate toward Linux for its openness, flexibility, stability, and suitability to command‑line, server, development, and automation tasks, making the switch a functional choice rather than a rebellion.

Why Chinese Input Methods Are the First Hurdle for New Linux Desktop Users

The article explains that while modern Linux desktop distributions are user‑friendly, configuring Chinese input methods can be the most confusing step for newcomers, detailing differences between Chinese‑focused and international distributions, common input frameworks like IBus, Fcitx5 and Rime, and practical ways to overcome the barrier.

From 84% to 57%: A Step‑by‑Step Server Disk Cleanup

This guide walks through locating disk‑space hogs on a Linux server, safely cleaning APT caches, logs, and Docker artifacts, configuring Docker log limits, migrating Docker data to a separate disk, and verifying that root‑partition usage drops from 84% to around 60%, while emphasizing verification before deletion and long‑term growth prevention.

Linux Kernel Sysctl Tuning: Common Pitfalls and Values You Shouldn’t Change Blindly

This guide explains how to safely tune Linux kernel sysctl parameters by first identifying the problem layer, backing up current settings, applying targeted changes, and verifying effects, while highlighting common mis‑configurations, real‑world case studies, best‑practice recommendations, and monitoring strategies.

How One tcpdump Command Ended a 3‑Day Network Outage (Full Linux Network Toolkit)

This guide compiles essential Linux network commands—from ping and traceroute to ip, ss, and tcpdump—plus deep packet‑capture techniques with Wireshark and real‑world case studies, providing a step‑by‑step troubleshooting workflow that lets operators quickly pinpoint and resolve complex network failures.

How to Diagnose Linux Server CPU Spikes: A Practical Step‑by‑Step Guide

This article presents a systematic, evidence‑driven process for locating and resolving high CPU usage on Linux servers, covering environment preparation, layered troubleshooting from whole‑machine to thread level, concrete command examples, real‑world case studies, best‑practice recommendations, and monitoring configurations.

Linux Network Troubleshooting: In‑Depth Guide to tcpdump, netstat and ss

This article walks system administrators and DevOps engineers through a systematic approach to diagnosing Linux network issues, covering the fundamentals of netstat, ss, and tcpdump, interpreting TCP state tables, analyzing packet captures, and resolving common problems such as TIME_WAIT buildup, SYN floods, and HTTPS handshake failures.

Linux Intrusion Detection and Incident Response: A Practical Guide to Security Event Investigation

This guide walks through building a layered intrusion detection system on Linux, comparing HIDS tools such as AIDE, rkhunter, and auditd, detailing installation, configuration, baseline management, automated response scripts, forensic data collection, monitoring, and best‑practice hardening for effective security event investigation and remediation.

IPv4 Exhausted? Complete IPv6 Migration Guide for Linux Ops—from Configuration to Troubleshooting

This comprehensive guide walks Linux system administrators through IPv6 fundamentals, address types, kernel checks, step‑by‑step configuration for CentOS/RHEL, Ubuntu and Debian, verification methods, common pitfalls, and best‑practice monitoring to smoothly transition from IPv4 to IPv6.

Linus Torvalds on AI in Linux: Boosting Productivity, Not Replacing Human Insight

Linus Torvalds argues that AI tools can enhance Linux kernel development productivity but risk overwhelming maintainers with low-quality, superficial contributions, leading to burnout; he stresses the irreplaceable role of deep human understanding, collaboration, and critical review in sustaining long-term open-source projects.

Linus Says AI Is Just a Tool: “Atmosphere Programming” Works for Throwaway Code but Not for 35‑Year Projects

In a candid Open Source Summit interview, Linus Torvalds explains how AI has boosted Linux commit activity by about 20%, helps uncover bugs, yet floods maintainers with duplicate vulnerability reports, prompting new disclosure policies and highlighting the limits of AI for long‑term, heavily maintained software.

Lesser‑Known Linux Network Monitoring Tools You Should Try

This article surveys a wide range of Linux command‑line utilities for monitoring network traffic—such as nethogs, nload, iftop, collectl, netstat, tcpdump and more—detailing each tool's unique features, installation commands for various distributions, and example usage to help both newcomers and seasoned administrators track bandwidth and connections effectively.

Enterprise Firewall Configuration: Mastering iptables and nftables Rule Management

This guide walks through the architecture of Linux Netfilter, compares iptables and nftables, and provides step‑by‑step commands, migration scripts, best‑practice recommendations, and troubleshooting tips for building a robust, enterprise‑grade firewall on modern Linux distributions.

Hardening SSH and Web Services with Fail2ban: Protect Against Brute‑Force Attacks

This guide explains how to use Fail2ban on Linux to automatically detect and block brute‑force login attempts for SSH, web authentication pages, APIs, and mail services, covering installation, configuration hierarchy, custom filters, progressive banning, performance‑optimized actions, high‑availability options, and troubleshooting steps.

Up to 500 articles, 100 per page. The archive offers another way to explore older articles.