<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Linux on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/linux/</link>
        <description>Recent content in Linux on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Sun, 24 May 2026 00:41:23 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/linux/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>pci=nomsi and pcie_aspm=off explained: troubleshooting SATA expansion cards not detected, dropping disks, or freezing on Linux</title>
        <link>https://knightli.com/en/2026/05/24/pci-nomsi-pcie-aspm-off-linux-sata-expansion-card/</link>
        <pubDate>Sun, 24 May 2026 00:41:23 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/24/pci-nomsi-pcie-aspm-off-linux-sata-expansion-card/</guid>
        <description>&lt;p&gt;When using PCIe SATA expansion cards on Linux or Ubuntu, users often run into disks not being detected, disks dropping after some runtime, system freezes, or boot problems around PCIe link training. Common examples include JMB585 and ASM1166 SATA cards, especially in NAS boxes, mini PCs, industrial PCs, modified motherboards, or cheap adapter setups.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pci=nomsi&lt;/code&gt; and &lt;code&gt;pcie_aspm=off&lt;/code&gt; are two Linux kernel parameters often used when troubleshooting this class of problem. They both involve PCIe, but they address different layers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pci=nomsi&lt;/code&gt; mainly targets &lt;strong&gt;interrupt signaling problems&lt;/strong&gt;, meaning the way the device notifies the CPU is unreliable.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pcie_aspm=off&lt;/code&gt; mainly targets &lt;strong&gt;PCIe power management problems&lt;/strong&gt;, meaning the link fails to wake reliably after entering a low-power state.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you treat these two options as the same kind of fix, troubleshooting becomes guesswork. A better approach is to look at the symptoms and decide whether interrupts, link power management, or the hardware itself is the more likely suspect.&lt;/p&gt;
&lt;h2 id=&#34;pcinomsi-disable-message-signaled-interrupts&#34;&gt;pci=nomsi: disable message-signaled interrupts
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;pci=nomsi&lt;/code&gt; can be read as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PCI&lt;/code&gt;: PCI-related devices.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;no&lt;/code&gt;: disable.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MSI&lt;/code&gt;: Message Signaled Interrupts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It tells the Linux kernel not to use MSI / MSI-X interrupt mechanisms for PCI devices, and to fall back to the older INTx interrupt mode.&lt;/p&gt;
&lt;h2 id=&#34;what-is-msi&#34;&gt;What is MSI?
&lt;/h2&gt;&lt;p&gt;Traditionally, hardware devices notify the CPU through physical interrupt pins, known as legacy IRQs. This works, but sharing and scaling are limited.&lt;/p&gt;
&lt;p&gt;MSI / MSI-X came later. Instead of pulling a physical interrupt pin, the device writes a message to a specific memory address. When the CPU receives that message, it knows which device raised the interrupt. On modern systems, MSI / MSI-X is usually more flexible and better suited for high-concurrency devices.&lt;/p&gt;
&lt;p&gt;The problem is that not every PCIe expansion card implements MSI reliably. Some cheap cards, retired enterprise cards, bridge-chip designs, or SATA controllers with poor firmware may produce abnormal MSI messages, lost interrupts, or interrupt storms under Linux drivers.&lt;/p&gt;
&lt;p&gt;Common symptoms include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The machine hangs while detecting the PCIe expansion card during boot.&lt;/li&gt;
&lt;li&gt;The SATA expansion card does not detect disks at all.&lt;/li&gt;
&lt;li&gt;Random system freezes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dmesg&lt;/code&gt; shows errors such as &lt;code&gt;irq xx: nobody cared&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The card appears to work under Windows but is unstable under Linux.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The core problem is not the hard disk or filesystem. It is the interrupt communication path between the device and CPU.&lt;/p&gt;
&lt;h2 id=&#34;what-happens-after-adding-pcinomsi&#34;&gt;What happens after adding pci=nomsi?
&lt;/h2&gt;&lt;p&gt;Enable:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pci=nomsi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This tells the Linux kernel not to let PCI devices use advanced MSI message interrupts, and to fall back to legacy INTx interrupts.&lt;/p&gt;
&lt;p&gt;This may slightly reduce performance and interrupt handling efficiency, especially on high-throughput or high-interrupt devices. For home NAS setups, SATA expansion cards, and ordinary hard-drive arrays, the practical impact is usually small. The value is that it bypasses MSI compatibility bugs in some device firmware or bridge chips, allowing the system to identify the device and handle I/O reliably.&lt;/p&gt;
&lt;p&gt;In short, &lt;code&gt;pci=nomsi&lt;/code&gt; addresses &amp;ldquo;the device&amp;rsquo;s way of notifying the CPU is unreliable.&amp;rdquo;&lt;/p&gt;
&lt;h2 id=&#34;pcie_aspmoff-disable-pcie-active-state-power-management&#34;&gt;pcie_aspm=off: disable PCIe Active State Power Management
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;pcie_aspm=off&lt;/code&gt; can be read as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PCIe&lt;/code&gt;: PCI Express.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ASPM&lt;/code&gt;: Active State Power Management.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;off&lt;/code&gt;: disable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It disables PCIe link power-saving mechanisms, preventing PCIe links from entering low-power states.&lt;/p&gt;
&lt;h2 id=&#34;what-is-aspm&#34;&gt;What is ASPM?
&lt;/h2&gt;&lt;p&gt;ASPM is a PCIe power-saving mechanism. When the system sees that a PCIe link is idle, it can move the link into a lower-power state such as L0s or L1. When the device needs to transfer data again, the link wakes back up to normal operation.&lt;/p&gt;
&lt;p&gt;On well-designed hardware, this saves power and is almost invisible to users. On some consumer motherboards, mini PCs, industrial systems, cheap SATA cards, adapters, or systems with weaker signal quality, the problem is &amp;ldquo;it goes to sleep and does not wake cleanly.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;A typical case is a JMB585 or ASM1166 PCIe SATA card entering a low-power state after being idle. The next disk access requires the link to wake from L1. If the controller, motherboard, riser, power, or firmware quality is not good enough, wake-up may be too slow or the physical signal may glitch. The Linux kernel may then think the device briefly disappeared.&lt;/p&gt;
&lt;p&gt;Typical &lt;code&gt;dmesg&lt;/code&gt; messages include:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pcieport 0000:00:1c.0: PCIe Bus Error: severity=Corrected, type=Physical Layer
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ata1: link is slow to respond, please be patient
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ata1: COMRESET failed (errno=-16)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This may be followed by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Disk dropout.&lt;/li&gt;
&lt;li&gt;Degraded arrays.&lt;/li&gt;
&lt;li&gt;Filesystem remounted read-only.&lt;/li&gt;
&lt;li&gt;NAS services failing.&lt;/li&gt;
&lt;li&gt;System I/O hangs.&lt;/li&gt;
&lt;li&gt;Disk temporarily returns after reboot.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The frustrating part is that the problem may not appear at boot. It often happens after the system has been running, after an idle period, or during a load transition.&lt;/p&gt;
&lt;h2 id=&#34;what-happens-after-adding-pcie_aspmoff&#34;&gt;What happens after adding pcie_aspm=off?
&lt;/h2&gt;&lt;p&gt;Enable:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pcie_aspm=off
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This tells the kernel to disable system-wide PCIe ASPM. PCIe links should remain in normal connected states as much as possible, whether idle or busy, instead of entering low-power sleep.&lt;/p&gt;
&lt;p&gt;The side effect is slightly higher power use. For desktops, NAS boxes, and mini PCs, this is often only hundreds of milliwatts to one or two watts. For laptops, it may affect battery life. The benefit is fewer disk drops, link-training errors, and physical-layer errors caused by PCIe link sleep and wake.&lt;/p&gt;
&lt;p&gt;In short, &lt;code&gt;pcie_aspm=off&lt;/code&gt; addresses &amp;ldquo;the PCIe link does not wake reliably after sleeping.&amp;rdquo;&lt;/p&gt;
&lt;h2 id=&#34;the-difference-between-the-two-parameters&#34;&gt;The difference between the two parameters
&lt;/h2&gt;&lt;p&gt;They solve two different classes of problems:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Parameter&lt;/th&gt;
          &lt;th&gt;Core problem&lt;/th&gt;
          &lt;th&gt;Common symptoms&lt;/th&gt;
          &lt;th&gt;Main side effect&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;pci=nomsi&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Interrupt signaling conflicts, poor MSI / MSI-X compatibility&lt;/td&gt;
          &lt;td&gt;Boot hangs, no disk detection, &lt;code&gt;irq xx: nobody cared&lt;/code&gt;, system freeze&lt;/td&gt;
          &lt;td&gt;Slightly lower interrupt efficiency under very high concurrency&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;pcie_aspm=off&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;PCIe power-save wake failure, unstable link signal&lt;/td&gt;
          &lt;td&gt;Works at boot, drops disks later, &lt;code&gt;PCIe Bus Error&lt;/code&gt;, &lt;code&gt;COMRESET failed&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Slightly higher power use, slightly lower laptop battery life&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;They do not replace each other. One controls interrupts, the other controls link power management.&lt;/p&gt;
&lt;p&gt;If the system hangs during boot or the device is never detected, suspect &lt;code&gt;pci=nomsi&lt;/code&gt; first. If it boots normally but drops disks later, or &lt;code&gt;dmesg&lt;/code&gt; shows Physical Layer, COMRESET, or &amp;ldquo;link is slow to respond&amp;rdquo; messages, suspect &lt;code&gt;pcie_aspm=off&lt;/code&gt; first.&lt;/p&gt;
&lt;h2 id=&#34;should-you-add-both&#34;&gt;Should you add both?
&lt;/h2&gt;&lt;p&gt;Many NAS users add both at once:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pci=nomsi pcie_aspm=off
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This is a quick troubleshooting method, especially with JMB585, ASM1166, mini PCs, adapter cards, uncertain power, and uncertain cabling. It can bypass MSI compatibility issues and ASPM wake problems at the same time.&lt;/p&gt;
&lt;p&gt;From a troubleshooting perspective, it is better to record symptoms and logs first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you see interrupt errors or boot hangs, try &lt;code&gt;pci=nomsi&lt;/code&gt; first.&lt;/li&gt;
&lt;li&gt;If you see disk drops, PCIe Bus Error, or COMRESET after runtime, try &lt;code&gt;pcie_aspm=off&lt;/code&gt; first.&lt;/li&gt;
&lt;li&gt;If the system is unstable and you need to restore service quickly, add both, then test them separately later.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This helps you identify the actual class of problem, which is useful when changing cards, slots, motherboards, or BIOS settings later.&lt;/p&gt;
&lt;h2 id=&#34;how-to-make-it-permanent-on-ubuntu--debian&#34;&gt;How to make it permanent on Ubuntu / Debian
&lt;/h2&gt;&lt;p&gt;Edit the Grub configuration file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo nano /etc/default/grub
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Find this line:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;GRUB_CMDLINE_LINUX_DEFAULT=&amp;#34;quiet splash&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Append the parameters inside the quotes, separated by spaces. For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;GRUB_CMDLINE_LINUX_DEFAULT=&amp;#34;quiet splash pci=nomsi pcie_aspm=off&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Save and exit. In Nano, press &lt;code&gt;Ctrl+O&lt;/code&gt;, confirm with Enter, then press &lt;code&gt;Ctrl+X&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Update Grub and reboot:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo update-grub
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo reboot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After reboot, check whether the kernel command line is active:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat /proc/cmdline
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the output contains &lt;code&gt;pci=nomsi&lt;/code&gt; and &lt;code&gt;pcie_aspm=off&lt;/code&gt;, the parameters are active for the current boot.&lt;/p&gt;
&lt;h2 id=&#34;what-else-should-you-check&#34;&gt;What else should you check?
&lt;/h2&gt;&lt;p&gt;These two parameters are useful, but they are not universal fixes for every disk-drop problem. When troubleshooting SATA expansion cards and NAS disk drops, also check:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Loose or poor-quality SATA data cables.&lt;/li&gt;
&lt;li&gt;Stable disk power, especially when many disks spin up at once.&lt;/li&gt;
&lt;li&gt;Poor PCIe slot contact.&lt;/li&gt;
&lt;li&gt;Expansion card overheating.&lt;/li&gt;
&lt;li&gt;BIOS options related to PCIe ASPM, Above 4G Decoding, and PCIe speed.&lt;/li&gt;
&lt;li&gt;Known firmware issues in the SATA expansion card.&lt;/li&gt;
&lt;li&gt;Disk SMART warnings, bad sectors, or I/O errors in system logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If disk SMART is already reporting errors, or power delivery is unstable, kernel parameters alone will not solve the underlying problem.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;pci=nomsi&lt;/code&gt; and &lt;code&gt;pcie_aspm=off&lt;/code&gt; are both common troubleshooting parameters for unstable PCIe SATA expansion cards on Linux, but they work at different layers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pci=nomsi&lt;/code&gt;: disables MSI / MSI-X to bypass interrupt compatibility issues.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pcie_aspm=off&lt;/code&gt;: disables PCIe ASPM to avoid wake failures after link power saving.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For JMB585, ASM1166, NAS systems, mini PCs, and cheap PCIe cards, these two parameters often help. The safer approach is to inspect &lt;code&gt;dmesg&lt;/code&gt;, decide whether the problem looks like interrupts or link power management, then choose one or both.&lt;/p&gt;
&lt;p&gt;They are troubleshooting tools, not a replacement for good hardware. If the system becomes stable after adding them, the problem is likely in interrupt compatibility or PCIe power management. If disks still drop, continue checking power, cables, cooling, disk health, and the expansion card itself.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>CVE-2026-43494 / PinTheft: Local Privilege Escalation Risk from Linux RDS and io_uring</title>
        <link>https://knightli.com/en/2026/05/22/linux-kernel-cve-2026-43494-pintheft/</link>
        <pubDate>Fri, 22 May 2026 15:16:59 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/22/linux-kernel-cve-2026-43494-pintheft/</guid>
        <description>&lt;p&gt;&lt;code&gt;CVE-2026-43494&lt;/code&gt; is a Linux kernel local privilege escalation risk. The related exploitation chain is also known publicly as &lt;code&gt;PinTheft&lt;/code&gt;. The key point is not a remote entry point, but whether a low-privilege local user can line up RDS zerocopy, &lt;code&gt;io_uring&lt;/code&gt; fixed buffers, a readable SUID-root program, and a suitable kernel version.&lt;/p&gt;
&lt;p&gt;One naming detail is worth clarifying first: the &lt;code&gt;Unclecheng-li/poc-lab&lt;/code&gt; repository directory is named &lt;code&gt;CVE-2026-43494 PinTheft&lt;/code&gt;, while the README title also mentions &lt;code&gt;QVD-2026-27616 - PinTheft&lt;/code&gt;. Based on public CVE entries and third-party advisories, &lt;code&gt;CVE-2026-43494&lt;/code&gt; points to a Linux kernel RDS zerocopy issue where &lt;code&gt;op_nents&lt;/code&gt; is not reset correctly, leading to a double-free / reference-counting anomaly. &lt;code&gt;QVD-2026-27616&lt;/code&gt; appears more like a Qianxin risk advisory identifier. In real triage, record both identifiers, but treat distribution security advisories and kernel patch status as the source of truth.&lt;/p&gt;
&lt;h2 id=&#34;what-is-the-core-bug&#34;&gt;What Is the Core Bug?
&lt;/h2&gt;&lt;p&gt;The issue appears in the zerocopy send path of Linux RDS, Reliable Datagram Sockets. Public descriptions point to these key functions:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rds_message_zcopy_from_user()
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rds_message_purge()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;When &lt;code&gt;iov_iter_get_pages2()&lt;/code&gt; fails inside &lt;code&gt;rds_message_zcopy_from_user()&lt;/code&gt;, pages that have already been pinned can be released by the error path, but the related &lt;code&gt;op_nents&lt;/code&gt; state is not cleared correctly. Later, &lt;code&gt;rds_message_purge()&lt;/code&gt; may still release the residual entries again. The result is that the same batch of page references can be decremented too many times, creating an exploitable reference-counting error.&lt;/p&gt;
&lt;p&gt;Viewed alone, the RDS bug is an error-path memory-management issue inside the kernel. PinTheft becomes dangerous because the exploitation chain connects it with the &lt;code&gt;io_uring&lt;/code&gt; fixed-buffer mechanism: &lt;code&gt;io_uring&lt;/code&gt; still keeps an old &lt;code&gt;struct page *&lt;/code&gt;, while the page itself has already been freed and reallocated for another purpose. The public PoC then steers this state toward overwriting the page cache of a SUID-root program, eventually reaching local privilege escalation.&lt;/p&gt;
&lt;h2 id=&#34;why-it-is-called-pintheft&#34;&gt;Why It Is Called PinTheft
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;io_uring REGISTER_BUFFERS&lt;/code&gt; pins user pages. For normal pages, &lt;code&gt;FOLL_PIN&lt;/code&gt; is not just a simple reference increment; it raises the page refcount through a larger bias. The public PoC uses the concept of &lt;code&gt;GUP_PIN_COUNTING_BIAS = 1024&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The name PinTheft means the attack chain repeatedly &amp;ldquo;steals&amp;rdquo; those pin references through the RDS zerocopy failure path. After the references are drained, &lt;code&gt;io_uring&lt;/code&gt; still believes it holds a valid page, but that physical page can now be freed and reused by the page cache.&lt;/p&gt;
&lt;p&gt;This class of vulnerability is easy to misread as &amp;ldquo;directly modifying &lt;code&gt;/usr/bin/su&lt;/code&gt; on disk.&amp;rdquo; A more accurate description is that the exploitation chain tries to overwrite the in-memory page cache. The file itself may not be written back to disk, but when the kernel executes the SUID program, it may fetch instructions from the contaminated page cache and run the attack payload.&lt;/p&gt;
&lt;h2 id=&#34;the-trigger-conditions-are-not-broad&#34;&gt;The Trigger Conditions Are Not Broad
&lt;/h2&gt;&lt;p&gt;This is not a vulnerability where &amp;ldquo;any Linux server can be remotely hit.&amp;rdquo; Public information indicates that the exploitation chain depends on at least these conditions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The kernel has &lt;code&gt;CONFIG_RDS&lt;/code&gt; and &lt;code&gt;CONFIG_RDS_TCP&lt;/code&gt; enabled.&lt;/li&gt;
&lt;li&gt;The system has &lt;code&gt;CONFIG_IO_URING&lt;/code&gt; enabled, and &lt;code&gt;kernel.io_uring_disabled=0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;rds&lt;/code&gt; / &lt;code&gt;rds_tcp&lt;/code&gt; modules are already loaded, or a low-privilege user can trigger autoloading.&lt;/li&gt;
&lt;li&gt;A readable SUID-root binary exists locally, such as &lt;code&gt;/usr/bin/su&lt;/code&gt;, &lt;code&gt;/usr/bin/passwd&lt;/code&gt;, or &lt;code&gt;/usr/bin/pkexec&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The public PoC also depends on the newer &lt;code&gt;IORING_REGISTER_CLONE_BUFFERS&lt;/code&gt; API. CloudLinux analysis notes that the public PoC is more aligned with kernel 6.13 and later.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If any one of these links is missing, the public exploitation path breaks. For example, many RHEL-family distributions do not compile RDS by default, older Ubuntu kernels may lack the &lt;code&gt;io_uring&lt;/code&gt; clone-buffer API needed by the PoC, and some environments restrict automatic RDS module loading by unprivileged users.&lt;/p&gt;
&lt;h2 id=&#34;one-minute-self-check&#34;&gt;One-Minute Self-Check
&lt;/h2&gt;&lt;p&gt;First, check the kernel configuration:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;zgrep -E &lt;span class=&#34;s2&#34;&gt;&amp;#34;CONFIG_(RDS|RDS_TCP|IO_URING)&amp;#34;&lt;/span&gt; /proc/config.gz 2&amp;gt;/dev/null &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; grep -E &lt;span class=&#34;s2&#34;&gt;&amp;#34;CONFIG_(RDS|RDS_TCP|IO_URING)&amp;#34;&lt;/span&gt; /boot/config-&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;uname -r&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then check whether &lt;code&gt;io_uring&lt;/code&gt; is disabled:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat /proc/sys/kernel/io_uring_disabled 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Interpret the common values like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0&lt;/code&gt;: allowed, giving the largest exposure.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;1&lt;/code&gt;: restricted for unprivileged users; exact behavior depends on kernel version and distribution policy.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;2&lt;/code&gt;: &lt;code&gt;io_uring&lt;/code&gt; disabled.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Check whether the RDS modules exist and can be loaded:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;lsmod &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep -E &lt;span class=&#34;s2&#34;&gt;&amp;#34;^rds|^rds_tcp&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;modprobe -n -v rds_tcp 2&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; head -3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If &lt;code&gt;CONFIG_RDS&lt;/code&gt; is &lt;code&gt;not set&lt;/code&gt;, or the system has no &lt;code&gt;rds_tcp&lt;/code&gt; module at all, this bug usually cannot be reached. Conversely, if RDS is available, &lt;code&gt;io_uring&lt;/code&gt; is not disabled, and the system uses a relatively new general-purpose kernel, continue checking distribution fix status with higher priority.&lt;/p&gt;
&lt;h2 id=&#34;which-machines-deserve-priority&#34;&gt;Which Machines Deserve Priority
&lt;/h2&gt;&lt;p&gt;Prioritize these environments:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Multi-user Linux hosts, teaching machines, jump hosts, and shared development machines.&lt;/li&gt;
&lt;li&gt;Container hosts, especially environments that allow untrusted local users or have a loose container escape surface.&lt;/li&gt;
&lt;li&gt;Desktops or servers running newer mainline / rolling kernels, such as Arch-like rolling distributions.&lt;/li&gt;
&lt;li&gt;HPC, Oracle RAC, or other scenarios that may genuinely use RDS.&lt;/li&gt;
&lt;li&gt;CI workers, build machines, and lab environments that allow unprivileged users to run large amounts of local code.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For an ordinary web server where only controlled service accounts run applications and RDS is not enabled, the practical risk is much lower. But &amp;ldquo;much lower&amp;rdquo; does not mean &amp;ldquo;ignore it&amp;rdquo;: the typical impact of a kernel local privilege escalation is that an attacker first gains low-privilege access through Web, SSH, CI, containers, or an application bug, then uses the local bug to expand control.&lt;/p&gt;
&lt;h2 id=&#34;temporary-mitigation-ideas&#34;&gt;Temporary Mitigation Ideas
&lt;/h2&gt;&lt;p&gt;The proper fix should still come from the distribution kernel update. Patch status, backported versions, and affected ranges must be checked against advisories from Debian, Ubuntu, RHEL, AlmaLinux, Rocky Linux, SUSE, Arch, cloud vendors, or container base-image providers. Do not judge only by the upstream version number.&lt;/p&gt;
&lt;p&gt;While waiting for patches, or when an immediate kernel reboot is not possible, choose temporary measures according to the environment:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# If the business does not depend on RDS, block related module loading&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo sh -c &lt;span class=&#34;s2&#34;&gt;&amp;#34;printf &amp;#39;install rds /bin/false\ninstall rds_tcp /bin/false\ninstall rds_rdma /bin/false\n&amp;#39; &amp;gt; /etc/modprobe.d/pintheft.conf&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rmmod rds_tcp 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rmmod rds_rdma 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rmmod rds 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the business does not depend on &lt;code&gt;io_uring&lt;/code&gt;, consider disabling or restricting it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo sysctl -w kernel.io_uring_disabled&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Persistent configuration needs to be written into the appropriate &lt;code&gt;/etc/sysctl.d/*.conf&lt;/code&gt; file. Be careful with this step: modern databases, proxies, runtimes, or high-performance I/O programs may use &lt;code&gt;io_uring&lt;/code&gt;. Confirm business dependencies before changing production systems.&lt;/p&gt;
&lt;h2 id=&#34;how-to-verify-after-fixing&#34;&gt;How to Verify After Fixing
&lt;/h2&gt;&lt;p&gt;After upgrading the kernel, do not rely only on package-manager success output. Confirm three things:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;uname -a
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat /proc/sys/kernel/io_uring_disabled 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;modprobe -n -v rds_tcp 2&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; head -3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If a distribution advisory explicitly says &lt;code&gt;CVE-2026-43494&lt;/code&gt; is fixed, the kernel may still be protected even when &lt;code&gt;uname -r&lt;/code&gt; does not look like the newest upstream release, because the stable distribution kernel may have received a backported patch. Conversely, if the kernel comes from a self-built tree, third-party repository, cloud marketplace image, or container host template, continue checking the patch commit and build time.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Unclecheng-li/poc-lab/tree/main/CVE-2026-43494%20PinTheft&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Unclecheng-li/poc-lab: CVE-2026-43494 PinTheft&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://dbugs.ptsecurity.com/vulnerability/PT-2026-42451&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;dbugs: CVE-2026-43494&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://blog.cloudlinux.com/pintheft-cloudlinux-platforms-not-affected&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;CloudLinux: PinTheft (CVE-2026-43494) kernel LPE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://git.kernel.org/stable/c/e174929793195e0cd6a4adb0cad731b39f9019b4&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Linux stable commit: net/rds reset op_nents when zerocopy page pin fails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Impact Summary of Four Recent Linux Local Security Issues: Copy Fail, Dirty Frag, Fragnesia, and ssh-keysign-pwn</title>
        <link>https://knightli.com/en/2026/05/20/linux-lpe-four-vulnerabilities-impact-summary/</link>
        <pubDate>Wed, 20 May 2026 23:00:37 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/20/linux-lpe-four-vulnerabilities-impact-summary/</guid>
        <description>&lt;p&gt;Several high-profile local security issues have appeared in the Linux ecosystem recently. Individually, they involve different areas: crypto interfaces, network and IPsec paths, page cache handling, and ptrace access checks. Together, they point to the same operational lesson: once an attacker has a low-privilege local execution point, the risk to Linux hosts, container nodes, CI machines, and multi-user servers increases sharply.&lt;/p&gt;
&lt;p&gt;This article does not repeat all technical details of each vulnerability. Instead, it summarizes their practical impact and links to four separate articles on this site for deeper reading.&lt;/p&gt;
&lt;h2 id=&#34;what-the-four-events-affect&#34;&gt;What the Four Events Affect
&lt;/h2&gt;&lt;p&gt;The four risks worth tracking are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Copy Fail (CVE-2026-31431): a low-privilege local user may affect the page cache through kernel crypto-related paths and expand privileges.&lt;/li&gt;
&lt;li&gt;Dirty Frag (related to CVE-2026-43284 / CVE-2026-43500): risk centers on xfrm/ESP, RxRPC, and related network and kernel data paths, making it dangerous in post-compromise scenarios.&lt;/li&gt;
&lt;li&gt;Fragnesia (CVE-2026-46300): close to Dirty Frag, involving XFRM ESP-in-TCP, shared fragments, and page-cache write risk.&lt;/li&gt;
&lt;li&gt;ssh-keysign-pwn (CVE-2026-46333): not a direct root-shell bug, but a local information disclosure risk that may expose SSH host private keys, &lt;code&gt;/etc/shadow&lt;/code&gt;, and other sensitive files.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The entry points differ, and so do the mitigations. Fixing Copy Fail does not automatically cover Dirty Frag or Fragnesia. Disabling some network modules does not automatically remove the information disclosure risk around ssh-keysign-pwn.&lt;/p&gt;
&lt;h2 id=&#34;copy-fail-high-priority-for-containers-and-ci-nodes&#34;&gt;Copy Fail: High Priority for Containers and CI Nodes
&lt;/h2&gt;&lt;p&gt;The key impact of Copy Fail is not an application crash. It is that low-privilege execution may be turned into root privileges. It is especially sensitive in these environments:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CI/CD nodes that allow users to upload or run code.&lt;/li&gt;
&lt;li&gt;Container hosts running untrusted workloads.&lt;/li&gt;
&lt;li&gt;Development machines, jump hosts, and shared servers.&lt;/li&gt;
&lt;li&gt;Cloud hosts running older kernels with slower patch cycles.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The danger is that Copy Fail has a relatively low exploitation threshold and combines easily with container scenarios. Many teams treat containers as a strong isolation boundary, but ordinary containers still share the host kernel by default. If an attacker gets a shell inside a container, a kernel LPE can turn a container issue into a host issue.&lt;/p&gt;
&lt;p&gt;Detailed analysis: &lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/01/copy-fail-cve-2026-31431-linux-kernel-container-escape/&#34; &gt;Copy Fail CVE-2026-31431: Container Escape Risk in a Linux Kernel File-Copy Path&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;dirty-frag-a-post-compromise-amplifier&#34;&gt;Dirty Frag: A Post-Compromise Amplifier
&lt;/h2&gt;&lt;p&gt;Dirty Frag is more like a privilege amplifier after an attacker has entered a system. It is not a typical remote unauthenticated vulnerability. The usual prerequisite is that the attacker already has local execution through a weak password, WebShell, low-privilege service account, container task, or another foothold.&lt;/p&gt;
&lt;p&gt;Its practical impact appears in several places:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A compromised low-privilege account may become root.&lt;/li&gt;
&lt;li&gt;A low-privilege execution point inside a container may threaten the host.&lt;/li&gt;
&lt;li&gt;Systems using IPsec, ESP, RxRPC, or related kernel networking capabilities need careful patch and mitigation review.&lt;/li&gt;
&lt;li&gt;Security teams should look beyond perimeter defense and include post-compromise privilege escalation chains.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Dirty Frag reminds operations teams that local privilege escalation may not be the first entry point, but it can decide how far an intrusion goes. Once a low-privilege foothold exists, attackers will look for kernel bugs to push privileges to the highest level.&lt;/p&gt;
&lt;p&gt;Detailed analysis: &lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/09/dirty-frag-cve-2026-43284-linux-lpe-mitigation/&#34; &gt;Dirty Frag CVE-2026-43284: Linux Local Privilege Escalation Risk and Mitigation Guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;fragnesia-similar-attack-surfaces-are-not-cleaned-up-all-at-once&#34;&gt;Fragnesia: Similar Attack Surfaces Are Not Cleaned Up All at Once
&lt;/h2&gt;&lt;p&gt;Fragnesia matters because it shows that the attack surface near Dirty Frag is not an isolated one-off issue. Even if one bug is fixed, neighboring paths, similar data structures, and related module combinations may still contain new exploitable points.&lt;/p&gt;
&lt;p&gt;Its operational impact is mainly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do not handle only the vulnerability name once. Keep checking by attack surface.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, &lt;code&gt;rxrpc&lt;/code&gt;, XFRM, and ESP-in-TCP should be evaluated against actual business dependencies.&lt;/li&gt;
&lt;li&gt;If a system does not depend on the related network capabilities, temporary disabling may be considered, but it must be tested first to avoid breaking VPN, IPsec, tunnels, or internal networking.&lt;/li&gt;
&lt;li&gt;Page-cache pollution risks can create detection blind spots where files appear unchanged, but the execution path is affected.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For enterprises, the biggest lesson is that patch management should not look only at a single CVE. A safer approach is to build an inventory around subsystems and attack surfaces, then identify which machines expose the relevant capabilities and which services truly need those modules.&lt;/p&gt;
&lt;p&gt;Detailed analysis: &lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/15/linux-kernel-fragnesia-local-privilege-escalation/&#34; &gt;Fragnesia (CVE-2026-46300): Linux Kernel Local Privilege Escalation Impact and Mitigation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;ssh-keysign-pwn-not-direct-root-still-dangerous&#34;&gt;ssh-keysign-pwn: Not Direct Root, Still Dangerous
&lt;/h2&gt;&lt;p&gt;ssh-keysign-pwn differs from the previous three. It is more of a local sensitive information disclosure issue than a direct root-shell vulnerability. But in real attacks, sensitive information disclosure can quickly become a larger incident.&lt;/p&gt;
&lt;p&gt;The main impacts include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Leaked SSH host private keys may damage host identity trust.&lt;/li&gt;
&lt;li&gt;Access to files such as &lt;code&gt;/etc/shadow&lt;/code&gt; can lead to offline cracking and account takeover.&lt;/li&gt;
&lt;li&gt;Multi-user servers, jump hosts, build machines, and shared development machines carry higher risk.&lt;/li&gt;
&lt;li&gt;Even without immediate privilege escalation, attackers may obtain credential material useful for lateral movement.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This type of issue is easy to underestimate because it does not look as dramatic as a direct root shell. In enterprise environments, however, key and password-hash exposure often means a longer cleanup cycle: rotating SSH host keys, reviewing trust relationships, checking account passwords, and auditing login logs.&lt;/p&gt;
&lt;p&gt;Detailed analysis: &lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/17/ssh-keysign-pwn-cve-2026-46333/&#34; &gt;ssh-keysign-pwn (CVE-2026-46333): Linux Local Information Disclosure, SSH Host Keys, and /etc/shadow Risk&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;shared-impact-containers-are-not-a-strong-boundary-by-default&#34;&gt;Shared Impact: Containers Are Not a Strong Boundary by Default
&lt;/h2&gt;&lt;p&gt;Taken together, these four events make one point clear: ordinary container isolation is not virtual-machine isolation.&lt;/p&gt;
&lt;p&gt;Docker, containerd, and Kubernetes use namespaces, cgroups, capabilities, seccomp, AppArmor, and SELinux to reduce attack surface, but they usually still share the host kernel. If the vulnerability is in the shared kernel, a low-privilege execution point inside a container can become an entry point.&lt;/p&gt;
&lt;p&gt;High-risk environments should check:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether untrusted code is allowed to run on shared hosts.&lt;/li&gt;
&lt;li&gt;Whether containers run as root by default.&lt;/li&gt;
&lt;li&gt;Whether unnecessary capabilities are granted.&lt;/li&gt;
&lt;li&gt;Whether seccomp policies are too broad.&lt;/li&gt;
&lt;li&gt;Whether multi-tenant workloads should move to gVisor, Kata Containers, Firecracker microVM, dedicated virtual machines, or dedicated nodes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CI/CD platforms deserve special attention. Build jobs naturally run external code, dependency install scripts, test scripts, and temporary binaries. If these jobs share hosts with long-running services, one local privilege escalation can affect much larger infrastructure.&lt;/p&gt;
&lt;h2 id=&#34;shared-impact-patches-must-reach-the-running-kernel&#34;&gt;Shared Impact: Patches Must Reach the Running Kernel
&lt;/h2&gt;&lt;p&gt;A common Linux kernel patching mistake is assuming that an installed package means the machine is running the fixed kernel.&lt;/p&gt;
&lt;p&gt;At minimum, operations teams should verify three things:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;uname -a
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Check the currently running kernel.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;dpkg -l &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep linux-image
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Or on RHEL-family distributions:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rpm -qa &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep kernel
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Check installed kernel packages.&lt;/p&gt;
&lt;p&gt;Finally, confirm that the machine has rebooted into the fixed kernel. For core services that cannot reboot immediately, evaluate livepatch, hot patching, or short-term isolation, but do not treat temporary mitigation as the final fix.&lt;/p&gt;
&lt;h2 id=&#34;shared-impact-attack-surface-reduction-must-be-specific&#34;&gt;Shared Impact: Attack Surface Reduction Must Be Specific
&lt;/h2&gt;&lt;p&gt;These vulnerabilities remind us that Linux hardening cannot stop at &amp;ldquo;update the system&amp;rdquo; and &amp;ldquo;enable a firewall.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;More specific checks include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether AF_ALG / &lt;code&gt;algif_aead&lt;/code&gt; is used by business workloads.&lt;/li&gt;
&lt;li&gt;Whether XFRM, ESP, ESP-in-TCP, and IPsec are required by VPNs, tunnels, or security gateways.&lt;/li&gt;
&lt;li&gt;Whether RxRPC is needed.&lt;/li&gt;
&lt;li&gt;Whether unprivileged user namespaces must be enabled.&lt;/li&gt;
&lt;li&gt;Whether containers can create overly broad socket types.&lt;/li&gt;
&lt;li&gt;Whether ptrace access policies are too loose.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the business does not need certain capabilities, evaluate disabling modules, adjusting sysctl settings, tightening seccomp, and reducing capabilities. Do not blindly copy commands into production. Inventory dependencies first, then roll out changes gradually.&lt;/p&gt;
&lt;h2 id=&#34;suggested-response-order&#34;&gt;Suggested Response Order
&lt;/h2&gt;&lt;p&gt;First, prioritize machines where local code execution is exposed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Container hosts.&lt;/li&gt;
&lt;li&gt;CI/CD runners.&lt;/li&gt;
&lt;li&gt;Jump hosts.&lt;/li&gt;
&lt;li&gt;Multi-user servers.&lt;/li&gt;
&lt;li&gt;Hosts running external-facing services.&lt;/li&gt;
&lt;li&gt;Systems running untrusted plugins, scripts, or extensions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Second, confirm distribution advisories and the actual running kernel. Do not rely only on upstream version numbers. Debian, Ubuntu, RHEL, AlmaLinux, Rocky Linux, SUSE, openEuler, and other distributions may backport security fixes.&lt;/p&gt;
&lt;p&gt;Third, tighten container runtime policies. Prefer non-root users, minimal capabilities, &lt;code&gt;no-new-privileges&lt;/code&gt;, read-only filesystems, and explicit seccomp plus AppArmor or SELinux policies.&lt;/p&gt;
&lt;p&gt;Fourth, review key and credential exposure. Especially for environments affected by ssh-keysign-pwn, evaluate whether SSH host keys, &lt;code&gt;/etc/shadow&lt;/code&gt;, jump-host credentials, and CI secrets need rotation.&lt;/p&gt;
&lt;p&gt;Fifth, improve monitoring. Watch for abnormal root shells, suspicious local LPE PoCs, critical file changes, abnormal ptrace behavior, container processes accessing host paths, and unusual network connections from CI nodes.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The point of these four events is not &amp;ldquo;Linux is insecure.&amp;rdquo; The point is that default trust is no longer enough.&lt;/p&gt;
&lt;p&gt;Linux remains transparent, fixable, configurable, and hardenable. But in environments where containers, CI, multi-tenancy, and AI-driven code execution are increasingly common, a low-privilege execution point can no longer be treated as a minor issue. If the kernel contains exploitable local privilege escalation or sensitive information disclosure bugs, a partial intrusion can become host control, credential exposure, or lateral movement.&lt;/p&gt;
&lt;p&gt;A more realistic approach is to treat these four events as a reminder: patch quickly, confirm rebooted kernels, enable modules only when needed, tighten containers, make key rotation possible, and reassess isolation levels for multi-tenant workloads.&lt;/p&gt;
&lt;p&gt;Further Reading on This Site:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/01/copy-fail-cve-2026-31431-linux-kernel-container-escape/&#34; &gt;Copy Fail CVE-2026-31431: Container Escape Risk in a Linux Kernel File-Copy Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/09/dirty-frag-cve-2026-43284-linux-lpe-mitigation/&#34; &gt;Dirty Frag CVE-2026-43284: Linux Local Privilege Escalation Risk and Mitigation Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/15/linux-kernel-fragnesia-local-privilege-escalation/&#34; &gt;Fragnesia (CVE-2026-46300): Linux Kernel Local Privilege Escalation Impact and Mitigation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/05/17/ssh-keysign-pwn-cve-2026-46333/&#34; &gt;ssh-keysign-pwn (CVE-2026-46333): Linux Local Information Disclosure, SSH Host Keys, and /etc/shadow Risk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>ssh-keysign-pwn (CVE-2026-46333): Linux Local Information Disclosure, SSH Host Keys, and /etc/shadow Risk</title>
        <link>https://knightli.com/en/2026/05/17/ssh-keysign-pwn-cve-2026-46333/</link>
        <pubDate>Sun, 17 May 2026 09:29:03 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/17/ssh-keysign-pwn-cve-2026-46333/</guid>
        <description>&lt;p&gt;&lt;code&gt;ssh-keysign-pwn&lt;/code&gt; refers to a set of exploitation paths around a logic flaw in Linux kernel &lt;code&gt;__ptrace_may_access()&lt;/code&gt;, assigned &lt;code&gt;CVE-2026-46333&lt;/code&gt;. It is not a remote unauthenticated flaw and it does not directly hand out a root shell, but the risk is still high: a low-privileged local user may read root-owned sensitive files that should be inaccessible, such as SSH host private keys or &lt;code&gt;/etc/shadow&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For operations teams, the priority is not reproducing a PoC. The priority is to identify affected machines, upgrade the kernel, reboot into the fixed kernel, and rotate SSH host keys or reset passwords when necessary.&lt;/p&gt;
&lt;h2 id=&#34;bottom-line&#34;&gt;Bottom line
&lt;/h2&gt;&lt;p&gt;This vulnerability deserves high handling priority for four reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It can be triggered by a low-privileged local user and does not require root.&lt;/li&gt;
&lt;li&gt;Public PoC code is available, lowering the exploitation barrier.&lt;/li&gt;
&lt;li&gt;The potential targets are not ordinary files, but SSH host private keys and &lt;code&gt;/etc/shadow&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The fix requires a kernel patch and reboot; installing packages without rebooting is not enough.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your servers have multiple users, local shell access, shared hosting, CI runners, container hosts, student lab machines, bastion hosts, or any local users you do not fully trust, handle this first.&lt;/p&gt;
&lt;h2 id=&#34;what-the-vulnerability-is&#34;&gt;What the vulnerability is
&lt;/h2&gt;&lt;p&gt;Qualys disclosed details on oss-security on May 15, 2026. They had previously reported a Linux kernel &lt;code&gt;__ptrace_may_access()&lt;/code&gt; logic issue to &lt;code&gt;security@kernel.org&lt;/code&gt;, and the upstream fix had already been merged by Linus. Public exploit code then appeared, so Qualys posted the details to oss-security.&lt;/p&gt;
&lt;p&gt;The Linux kernel CVE team later assigned &lt;code&gt;CVE-2026-46333&lt;/code&gt;. The NVD page lists kernel.org as the source, and the description maps to the kernel commit &lt;code&gt;ptrace: slightly saner &#39;get_dumpable()&#39; logic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In simple terms, the bug sits in a process exit path. When some privileged processes are exiting, ptrace-related access-check logic in the kernel may bypass a dumpable check that should have applied because the target task no longer has an &lt;code&gt;mm&lt;/code&gt;. An attacker can race a very narrow timing window and obtain file descriptors that the exiting privileged process still has open.&lt;/p&gt;
&lt;p&gt;That is why the issue is called &lt;code&gt;ssh-keysign-pwn&lt;/code&gt;: one public exploitation path uses &lt;code&gt;ssh-keysign&lt;/code&gt; to read SSH host private keys.&lt;/p&gt;
&lt;h2 id=&#34;why-ssh-host-private-keys-and-etcshadow-may-be-exposed&#34;&gt;Why SSH host private keys and /etc/shadow may be exposed
&lt;/h2&gt;&lt;p&gt;At its core, this is a local information disclosure issue. It abuses a window during privileged process exit where the memory descriptor is gone, but file descriptors have not yet been closed.&lt;/p&gt;
&lt;p&gt;The AlmaLinux advisory explains the risk clearly: if a privileged program opened sensitive files before dropping privileges, and an attacker successfully grabs the corresponding file descriptor during the exit window, those sensitive files may become readable.&lt;/p&gt;
&lt;p&gt;Two commonly discussed targets are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ssh-keysign&lt;/code&gt;: may involve SSH host private keys such as &lt;code&gt;/etc/ssh/ssh_host_*_key&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;chage&lt;/code&gt;: may involve &lt;code&gt;/etc/shadow&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If SSH host private keys leak, an attacker may impersonate the host and undermine SSH host identity trust. If &lt;code&gt;/etc/shadow&lt;/code&gt; leaks, an attacker can crack password hashes offline and expand the compromise later.&lt;/p&gt;
&lt;p&gt;That is why this should be treated as high priority even though it is not a &amp;ldquo;direct root shell&amp;rdquo; bug.&lt;/p&gt;
&lt;h2 id=&#34;how-to-assess-exposure&#34;&gt;How to assess exposure
&lt;/h2&gt;&lt;p&gt;From the upstream perspective, this is a Linux kernel vulnerability. NVD records show the issue entered the NVD dataset on May 15, 2026, with no CVSS score assigned at that time.&lt;/p&gt;
&lt;p&gt;Distribution status should be checked against each vendor&amp;rsquo;s own advisory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AlmaLinux 8, 9, and 10 published guidance and updated it on May 16, 2026 to say patched kernels had reached production repositories.&lt;/li&gt;
&lt;li&gt;Debian Security Tracker lists vulnerable and fixed states, plus fixed versions, for bullseye, bookworm, trixie, sid, and other branches.&lt;/li&gt;
&lt;li&gt;For other distributions, check the official security pages or repositories for Ubuntu, Red Hat, SUSE, Arch, Alpine, and so on.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do not judge safety only by the upstream kernel version. Distributions backport fixes, so the same upstream-looking version number may mean different patch states across distributions.&lt;/p&gt;
&lt;h2 id=&#34;which-machines-to-prioritize&#34;&gt;Which machines to prioritize
&lt;/h2&gt;&lt;p&gt;Prioritize remediation in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Multi-user servers and shared hosts.&lt;/li&gt;
&lt;li&gt;Bastion hosts, teaching machines, development machines, and other systems with normal shell accounts.&lt;/li&gt;
&lt;li&gt;CI runners, build machines, and hosting platform nodes.&lt;/li&gt;
&lt;li&gt;Container and virtualization hosts, especially where not-fully-trusted workloads coexist.&lt;/li&gt;
&lt;li&gt;Public service machines. The vulnerability needs local access, but the risk compounds once a web bug, RCE, weak password, or similar path gives an attacker a low-privileged foothold.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Pure single-user desktop systems are lower risk, but they should still be updated. Local low-privileged code execution is common on desktops through browsers, developer tools, scripts, and third-party software.&lt;/p&gt;
&lt;h2 id=&#34;remediation-guidance&#34;&gt;Remediation guidance
&lt;/h2&gt;&lt;p&gt;The preferred fix is to install the fixed kernel supplied by your distribution and reboot.&lt;/p&gt;
&lt;p&gt;Commands differ by distribution, but the principle is the same:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Refresh package metadata.&lt;/li&gt;
&lt;li&gt;Install the kernel package containing the &lt;code&gt;CVE-2026-46333&lt;/code&gt; fix.&lt;/li&gt;
&lt;li&gt;Reboot into the new kernel.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;uname -r&lt;/code&gt; and the distribution security advisory to verify the running kernel is fixed.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The AlmaLinux advisory says fixed kernels are available in production repositories and users can run the usual &lt;code&gt;dnf upgrade&lt;/code&gt; and reboot. The Debian tracker also lists fixed versions for multiple branches.&lt;/p&gt;
&lt;p&gt;Important: if you only install a new kernel package but do not reboot, the old vulnerable kernel is still running.&lt;/p&gt;
&lt;h2 id=&#34;temporary-mitigation-tighten-ptrace_scope&#34;&gt;Temporary mitigation: tighten ptrace_scope
&lt;/h2&gt;&lt;p&gt;If you cannot reboot immediately, tighten Yama &lt;code&gt;ptrace_scope&lt;/code&gt; first.&lt;/p&gt;
&lt;p&gt;Qualys confirmed in a follow-up oss-security reply that setting &lt;code&gt;/proc/sys/kernel/yama/ptrace_scope&lt;/code&gt; to &lt;code&gt;2&lt;/code&gt; (admin-only attach) or &lt;code&gt;3&lt;/code&gt; (no attach) blocks the public exploitation paths they know about. They also noted that other theoretical exploitation paths may exist, so this is only a mitigation, not a fix.&lt;/p&gt;
&lt;p&gt;Temporary setting:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo sysctl -w kernel.yama.ptrace_scope&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Persistent setting:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;kernel.yama.ptrace_scope = 3&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /etc/sysctl.d/99-ssh-keysign-pwn.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;ptrace_scope=3&lt;/code&gt; disables ptrace attach and may affect debugging workflows such as &lt;code&gt;gdb&lt;/code&gt; and &lt;code&gt;strace -p&lt;/code&gt;. If production debugging is required, evaluate &lt;code&gt;2&lt;/code&gt;. Either way, schedule the kernel upgrade and reboot as soon as possible.&lt;/p&gt;
&lt;h2 id=&#34;should-ssh-host-keys-be-rotated&#34;&gt;Should SSH host keys be rotated?
&lt;/h2&gt;&lt;p&gt;Use a conservative approach if the machine had any of the following conditions around the disclosure window:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Untrusted local users.&lt;/li&gt;
&lt;li&gt;Shared hosting or container/CI multi-tenant environments.&lt;/li&gt;
&lt;li&gt;Web vulnerabilities, weak passwords, supply-chain scripts, or other paths that could give an attacker a local foothold.&lt;/li&gt;
&lt;li&gt;Suspicious local processes, unusual debugging behavior, or public PoC files in logs.&lt;/li&gt;
&lt;li&gt;Long exposure before patching.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Conservative handling includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rotate SSH host keys after patching and rebooting.&lt;/li&gt;
&lt;li&gt;Update known-host fingerprint management systems.&lt;/li&gt;
&lt;li&gt;Notify automation that depends on the host fingerprint.&lt;/li&gt;
&lt;li&gt;Review SSH connection alerts so legitimate fingerprint changes are not mistaken for man-in-the-middle attacks, and real risks are not ignored.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;/etc/shadow&lt;/code&gt; may have leaked, also evaluate password resets, weak-password bans, and whether old hashes could be cracked offline.&lt;/p&gt;
&lt;h2 id=&#34;what-to-monitor&#34;&gt;What to monitor
&lt;/h2&gt;&lt;p&gt;The exploitation window is short, so traditional logs may not capture everything. Still, watch for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Files such as &lt;code&gt;ssh-keysign-pwn&lt;/code&gt;, &lt;code&gt;chage_pwn&lt;/code&gt;, or similar PoC artifacts in normal user directories.&lt;/li&gt;
&lt;li&gt;Suspicious compilation activity, such as unfamiliar C programs compiled in a short window.&lt;/li&gt;
&lt;li&gt;Signs of abnormal access to &lt;code&gt;/etc/ssh/ssh_host_*_key&lt;/code&gt; or &lt;code&gt;/etc/shadow&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Unusual &lt;code&gt;pidfd_getfd&lt;/code&gt;, &lt;code&gt;ptrace&lt;/code&gt;, or debugger-related activity.&lt;/li&gt;
&lt;li&gt;External reports of unexpected SSH host fingerprint changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These signals cannot prove exploitation occurred, and their absence cannot prove it did not. The real priorities remain patching, rebooting, credential rotation, and risk isolation.&lt;/p&gt;
&lt;h2 id=&#34;common-misconceptions&#34;&gt;Common misconceptions
&lt;/h2&gt;&lt;p&gt;First: this is not an OpenSSH remote vulnerability. The name includes &lt;code&gt;ssh-keysign&lt;/code&gt;, but the root cause is Linux kernel ptrace access-check logic, not the remote authentication path in &lt;code&gt;sshd&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Second: no local users does not mean no risk. The bug does require local execution, but real attack chains often obtain a low-privileged local foothold first through web services, CI, scripts, weak passwords, or container escape paths.&lt;/p&gt;
&lt;p&gt;Third: setting &lt;code&gt;ptrace_scope&lt;/code&gt; is not enough. It is a temporary mitigation, not the root fix. Kernel update and reboot are still required.&lt;/p&gt;
&lt;p&gt;Fourth: &amp;ldquo;no root shell&amp;rdquo; does not mean &amp;ldquo;no incident.&amp;rdquo; Exposure of SSH host private keys or &lt;code&gt;/etc/shadow&lt;/code&gt; can be enough to enable lateral movement, host impersonation, and offline password cracking.&lt;/p&gt;
&lt;h2 id=&#34;response-checklist&#34;&gt;Response checklist
&lt;/h2&gt;&lt;p&gt;Suggested order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Inventory affected Linux hosts, especially multi-user and shared environments.&lt;/li&gt;
&lt;li&gt;Check distribution security advisories and identify the fixed kernel version.&lt;/li&gt;
&lt;li&gt;Install the fixed kernel and reboot.&lt;/li&gt;
&lt;li&gt;For machines that cannot reboot immediately, set &lt;code&gt;kernel.yama.ptrace_scope=2&lt;/code&gt; or &lt;code&gt;3&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;After remediation, verify the running kernel version.&lt;/li&gt;
&lt;li&gt;Rotate SSH host keys on high-risk machines.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;/etc/shadow&lt;/code&gt; exposure is suspected, evaluate password resets and account audits.&lt;/li&gt;
&lt;li&gt;Check for public PoCs, unusual compilation, and suspicious local debugging behavior.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;ssh-keysign-pwn&lt;/code&gt; (&lt;code&gt;CVE-2026-46333&lt;/code&gt;) is a local information disclosure vulnerability rooted in Linux kernel &lt;code&gt;__ptrace_may_access()&lt;/code&gt; logic. It does not allow a remote attacker to break in directly and it does not directly grant a root shell, but it may let a low-privileged local user read high-value sensitive files, making it especially important in multi-user, shared hosting, CI, and container-host environments.&lt;/p&gt;
&lt;p&gt;The reliable fix is to upgrade to a distribution-provided fixed kernel and reboot. &lt;code&gt;ptrace_scope=2/3&lt;/code&gt; can be used as a temporary mitigation, but it does not replace patching. Critical hosts exposed during the risk window should also be evaluated for SSH host key rotation and password risk.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.openwall.com/lists/oss-security/2026/05/15/2&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;oss-security: Qualys disclosure of the __ptrace_may_access() logic issue&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.openwall.com/lists/oss-security/2026/05/15/9&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;oss-security: Qualys confirms the CVE-2026-46333 identifier&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.openwall.com/lists/oss-security/2026/05/15/8&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;oss-security: Qualys confirms ptrace_scope temporary mitigation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/CVE-2026-46333&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;NVD: CVE-2026-46333&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://security-tracker.debian.org/tracker/CVE-2026-46333&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Debian Security Tracker: CVE-2026-46333&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://almalinux.org/he/blog/2026-05-15-ssh-keysign-pwn-cve-2026-46333/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;AlmaLinux: ssh-keysign-pwn (CVE-2026-46333) Patches Released&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/torvalds/linux/commit/31e62c2ebbfdc3fe3dbdf5e02c92a9dc67087a3a&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Linux upstream fix: ptrace get_dumpable() logic&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Dirty Frag, Copy Fail, and Fragnesia: Comparing Three Recent Linux Local Privilege Escalation Flaws</title>
        <link>https://knightli.com/en/2026/05/15/linux-lpe-dirty-frag-copy-fail-fragnesia-analysis/</link>
        <pubDate>Fri, 15 May 2026 13:24:04 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/15/linux-lpe-dirty-frag-copy-fail-fragnesia-analysis/</guid>
        <description>&lt;p&gt;Several high-profile Linux kernel local privilege escalation vulnerabilities have appeared recently: Dirty Frag, Copy Fail, and Fragnesia. They look like a single family of events because the end result is similar: a low-privilege local user may be able to become root.&lt;/p&gt;
&lt;p&gt;But from an operations perspective, they should not be treated as one vulnerability. Their entry modules, trigger paths, mitigation options, and patch timelines differ. A better way to understand them is this: they expose a shared risk around the complex boundary between the Linux page cache, &lt;code&gt;splice&lt;/code&gt;, socket buffers, and crypto paths.&lt;/p&gt;
&lt;p&gt;This post only covers risk and response analysis. It does not include reproducible exploitation steps.&lt;/p&gt;
&lt;h2 id=&#34;what-the-three-flaws-are&#34;&gt;What the Three Flaws Are
&lt;/h2&gt;&lt;h3 id=&#34;dirty-frag-cve-2026-43284&#34;&gt;Dirty Frag: CVE-2026-43284
&lt;/h3&gt;&lt;p&gt;Dirty Frag mainly points to a page-cache write issue in the Linux kernel networking path. Public write-ups usually discuss it together with two issues: the &lt;code&gt;xfrm-ESP&lt;/code&gt; side, CVE-2026-43284, and the &lt;code&gt;rxrpc&lt;/code&gt; side, CVE-2026-43500.&lt;/p&gt;
&lt;p&gt;CVE-2026-43284 is related to in-place decryption when ESP handles shared &lt;code&gt;skb&lt;/code&gt; fragments. The key point is not that an attacker directly modifies a disk file, but that the kernel can write to shared pages it should not modify, affecting file contents in the page cache.&lt;/p&gt;
&lt;p&gt;Operationally, remember that Dirty Frag reaches &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, and &lt;code&gt;rxrpc&lt;/code&gt;, a set of kernel modules and networking subsystem paths. It is tied to IPsec, ESP, and RxRPC, so temporary mitigation also focuses on those modules.&lt;/p&gt;
&lt;h3 id=&#34;copy-fail-cve-2026-31431&#34;&gt;Copy Fail: CVE-2026-31431
&lt;/h3&gt;&lt;p&gt;Copy Fail is a Linux kernel local privilege escalation vulnerability disclosed by Theori / Xint Code. Its entry point is not the IPsec networking path, but the kernel userspace crypto API around &lt;code&gt;algif_aead&lt;/code&gt; / &lt;code&gt;AF_ALG&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Public explanations describe it as originating from an in-place optimization introduced in 2017. In some cases, the kernel failed to copy data as expected and instead placed page-cache pages into a writable destination path. An attacker can combine &lt;code&gt;AF_ALG&lt;/code&gt; with &lt;code&gt;splice()&lt;/code&gt; to perform a small controlled write to page-cache-backed pages.&lt;/p&gt;
&lt;p&gt;Its risk comes from strong exploitability and broad impact across mainstream distributions. Unlike Dirty Frag, Copy Fail&amp;rsquo;s temporary mitigation focuses on restricting or disabling &lt;code&gt;algif_aead&lt;/code&gt;, and on limiting &lt;code&gt;AF_ALG&lt;/code&gt; socket creation in container and CI environments.&lt;/p&gt;
&lt;h3 id=&#34;fragnesia-cve-2026-46300&#34;&gt;Fragnesia: CVE-2026-46300
&lt;/h3&gt;&lt;p&gt;Fragnesia is another Linux kernel local privilege escalation vulnerability disclosed by V12 Security, and it belongs to a similar attack surface as Dirty Frag. It is not the same bug as Dirty Frag, but it still revolves around IPsec ESP / &lt;code&gt;rxrpc&lt;/code&gt; related modules and page-cache write effects.&lt;/p&gt;
&lt;p&gt;AlmaLinux describes it as the third local-root issue in the same broad code area. The key problem is that &lt;code&gt;skb_try_coalesce()&lt;/code&gt; did not preserve the shared-fragment marker when coalescing socket buffer fragments, which could later let the XFRM ESP-in-TCP receive path decrypt in place over external page-cache pages.&lt;/p&gt;
&lt;p&gt;In short, Fragnesia is closer to Dirty Frag. Both revolve around &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, &lt;code&gt;rxrpc&lt;/code&gt;, &lt;code&gt;skb&lt;/code&gt; fragments, and ESP decryption paths. Their temporary mitigations also overlap heavily.&lt;/p&gt;
&lt;h2 id=&#34;similarities-why-they-are-dangerous&#34;&gt;Similarities: Why They Are Dangerous
&lt;/h2&gt;&lt;p&gt;The common thread is not that the exact code locations are identical, but that the attack outcome and risk model are very similar.&lt;/p&gt;
&lt;p&gt;First, all three are local privilege escalation issues. Attackers usually need ordinary local code execution first, then they can attempt to become root. For a single-user desktop this is not remote one-click compromise; for multi-user servers, CI runners, container hosts, shared development machines, and VPS instances with exposed SSH, low-privilege entry points are not rare.&lt;/p&gt;
&lt;p&gt;Second, all three involve page-cache writes. Attackers may not permanently modify the file on disk; instead, they affect the in-memory page-cache copy. This makes traditional integrity checks less reliable: the disk hash can remain normal while the execution path reads polluted page-cache content.&lt;/p&gt;
&lt;p&gt;Third, they are closer to deterministic logic bugs than timing-sensitive race conditions. Public material repeatedly notes that these issues do not require winning a race condition. Defenders should not underestimate exploit reliability based on older assumptions.&lt;/p&gt;
&lt;p&gt;Fourth, they amplify the risk of container and automation environments. Low-privilege code inside containers, CI jobs, build scripts, or third-party plugins can turn a &amp;ldquo;local issue&amp;rdquo; into a platform-level issue if it can reach the relevant host kernel interfaces.&lt;/p&gt;
&lt;h2 id=&#34;differences-one-mitigation-does-not-cover-all&#34;&gt;Differences: One Mitigation Does Not Cover All
&lt;/h2&gt;&lt;p&gt;The biggest difference is the entry module.&lt;/p&gt;
&lt;p&gt;Copy Fail&amp;rsquo;s critical entry point is &lt;code&gt;algif_aead&lt;/code&gt; / &lt;code&gt;AF_ALG&lt;/code&gt;, part of the kernel userspace crypto API. Its temporary defense focuses on disabling or restricting &lt;code&gt;algif_aead&lt;/code&gt;, and using seccomp to block containers from creating &lt;code&gt;AF_ALG&lt;/code&gt; sockets.&lt;/p&gt;
&lt;p&gt;Dirty Frag&amp;rsquo;s critical entry point is &lt;code&gt;xfrm-ESP&lt;/code&gt; and &lt;code&gt;rxrpc&lt;/code&gt;. It is closer to protocol and socket buffer handling paths. Temporary defense typically considers disabling &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, and &lt;code&gt;rxrpc&lt;/code&gt;, but that can affect IPsec, VPNs, tunnels, or related networking capabilities.&lt;/p&gt;
&lt;p&gt;Fragnesia sits in a similar region to Dirty Frag, but the concrete issue is that &lt;code&gt;skb_try_coalesce()&lt;/code&gt; did not preserve the shared-fragment marker. It is more like another branch of the Dirty Frag risk surface than a Copy Fail crypto API issue.&lt;/p&gt;
&lt;p&gt;So, fixing Copy Fail does not mean Dirty Frag and Fragnesia are covered. Likewise, disabling &lt;code&gt;esp4&lt;/code&gt; / &lt;code&gt;esp6&lt;/code&gt; does not automatically remove Copy Fail. Their patch state and mitigation strategy must be checked separately.&lt;/p&gt;
&lt;h2 id=&#34;how-to-judge-exposure&#34;&gt;How to Judge Exposure
&lt;/h2&gt;&lt;p&gt;For these vulnerabilities, do not judge only by distribution name or kernel major version. Distributions backport fixes, cloud vendors maintain their own kernel branches, and enterprise distributions may carry additional patches.&lt;/p&gt;
&lt;p&gt;A safer sequence is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check the distribution security advisory and kernel package changelog.&lt;/li&gt;
&lt;li&gt;Verify whether the current kernel package fixes the relevant CVE.&lt;/li&gt;
&lt;li&gt;For cloud servers, container hosts, and CI nodes, also check cloud or platform advisories.&lt;/li&gt;
&lt;li&gt;For temporary mitigations, confirm whether the business depends on the affected module.&lt;/li&gt;
&lt;li&gt;After a kernel update, schedule a reboot and confirm the running kernel has changed.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The most common trap is &amp;ldquo;the package is updated, but the machine has not rebooted.&amp;rdquo; Kernel vulnerabilities are not like ordinary userspace service updates. Until the system boots into the new kernel, the old kernel may still be running.&lt;/p&gt;
&lt;h2 id=&#34;operational-priority&#34;&gt;Operational Priority
&lt;/h2&gt;&lt;p&gt;The systems that deserve the highest priority are not all Linux machines equally. Start where low-privilege code execution is most likely.&lt;/p&gt;
&lt;p&gt;Highest-priority environments include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multi-user login servers&lt;/li&gt;
&lt;li&gt;CI / CD runners&lt;/li&gt;
&lt;li&gt;Build and artifact packaging machines&lt;/li&gt;
&lt;li&gt;Container hosts and Kubernetes nodes&lt;/li&gt;
&lt;li&gt;Shared development machines&lt;/li&gt;
&lt;li&gt;Cloud servers and VPS instances exposing SSH&lt;/li&gt;
&lt;li&gt;Platforms running third-party scripts, plugins, or job queues&lt;/li&gt;
&lt;li&gt;Machines with web vulnerabilities, weak passwords, or historical compromise signals&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Closed, single-user machines with no external code execution entry point are still at risk if vulnerable, but they can usually be handled later.&lt;/p&gt;
&lt;h2 id=&#34;how-to-treat-temporary-mitigation&#34;&gt;How to Treat Temporary Mitigation
&lt;/h2&gt;&lt;p&gt;Temporary mitigation is not a replacement for a patch. Its value is reducing exposure when you cannot immediately reboot or are waiting for distribution packages.&lt;/p&gt;
&lt;p&gt;For Copy Fail, focus on &lt;code&gt;algif_aead&lt;/code&gt; and &lt;code&gt;AF_ALG&lt;/code&gt;. If the business does not use the kernel AF_ALG crypto interface, evaluate disabling the related module. In container environments, check seccomp policies first so untrusted workloads cannot freely create the relevant socket.&lt;/p&gt;
&lt;p&gt;For Dirty Frag and Fragnesia, focus on &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, and &lt;code&gt;rxrpc&lt;/code&gt;. If the system does not depend on IPsec ESP, related VPNs, tunnels, or RxRPC, consider temporary disabling. Do not do this blindly in production because these modules may support real networking workloads.&lt;/p&gt;
&lt;p&gt;The final path is still a kernel update. Temporary mitigation can reduce attack surface, but it cannot prove the system is fully safe.&lt;/p&gt;
&lt;h2 id=&#34;what-these-three-flaws-tell-us&#34;&gt;What These Three Flaws Tell Us
&lt;/h2&gt;&lt;p&gt;The important warning is not just the number of CVEs. These flaws all cluster around high-complexity kernel paths: zero-copy, &lt;code&gt;splice&lt;/code&gt;, socket buffers, the page cache, crypto interfaces, and protocol-stack optimizations.&lt;/p&gt;
&lt;p&gt;These paths deliver performance, but their ownership boundaries are hard to maintain. Whether a fragment is shared, whether a page may be written in place, and whether an optimization truly only reduces copying all become security boundaries.&lt;/p&gt;
&lt;p&gt;For security and operations teams, the takeaways are practical:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Treat local privilege escalation as an amplifier for existing low-privilege entry points.&lt;/li&gt;
&lt;li&gt;Containers are not a natural isolation boundary for kernel vulnerabilities.&lt;/li&gt;
&lt;li&gt;File integrity checks cannot look only at disk contents.&lt;/li&gt;
&lt;li&gt;CI, build machines, and plugin platforms are high-priority assets.&lt;/li&gt;
&lt;li&gt;Kernel patching requires verifying both &amp;ldquo;installed&amp;rdquo; and &amp;ldquo;running&amp;rdquo; states.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Dirty Frag, Copy Fail, and Fragnesia are all high-priority recent Linux local privilege escalation events, but they are not three names for one vulnerability.&lt;/p&gt;
&lt;p&gt;Copy Fail goes through the &lt;code&gt;algif_aead&lt;/code&gt; / &lt;code&gt;AF_ALG&lt;/code&gt; crypto API path. Dirty Frag goes through &lt;code&gt;xfrm-ESP&lt;/code&gt; and &lt;code&gt;rxrpc&lt;/code&gt;. Fragnesia, in a nearby Dirty Frag attack surface, again triggers page-cache write risk through &lt;code&gt;skb&lt;/code&gt; fragment marker handling.&lt;/p&gt;
&lt;p&gt;Operationally, the safest response is to update the kernel according to distribution advisories and reboot. For systems that cannot be updated immediately, evaluate temporary module disabling or tighter seccomp rules based on the actual vulnerability entry point. Prioritize multi-tenant systems, CI, container hosts, and shared development environments.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Theori Copy Fail notes: &lt;a class=&#34;link&#34; href=&#34;https://github.com/theori-io/copy-fail-CVE-2026-31431&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://github.com/theori-io/copy-fail-CVE-2026-31431&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CERT-EU Copy Fail advisory: &lt;a class=&#34;link&#34; href=&#34;https://cert.europa.eu/publications/security-advisories/2026-005/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://cert.europa.eu/publications/security-advisories/2026-005/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AlmaLinux Dirty Frag notes: &lt;a class=&#34;link&#34; href=&#34;https://almalinux.org/blog/2026-05-07-dirty-frag/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://almalinux.org/blog/2026-05-07-dirty-frag/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AlmaLinux Fragnesia notes: &lt;a class=&#34;link&#34; href=&#34;https://almalinux.org/blog/2026-05-13-fragnesia-cve-2026-46300/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://almalinux.org/blog/2026-05-13-fragnesia-cve-2026-46300/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;V12 Security Fragnesia PoC notes: &lt;a class=&#34;link&#34; href=&#34;https://github.com/v12-security/pocs/tree/main/fragnesia&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://github.com/v12-security/pocs/tree/main/fragnesia&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Fragnesia (CVE-2026-46300): Impact and Mitigation for a Linux Kernel Local Privilege Escalation Flaw</title>
        <link>https://knightli.com/en/2026/05/15/linux-kernel-fragnesia-local-privilege-escalation/</link>
        <pubDate>Fri, 15 May 2026 13:18:01 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/15/linux-kernel-fragnesia-local-privilege-escalation/</guid>
        <description>&lt;p&gt;The Linux kernel has another local privilege escalation issue in the same broad attack surface as Dirty Frag: Fragnesia (CVE-2026-46300).&lt;/p&gt;
&lt;p&gt;According to V12 Security, Fragnesia is a Linux local privilege escalation vulnerability. An attacker does not need existing high privileges on the host. If they can execute local code, they may be able to abuse a logic flaw in the kernel&amp;rsquo;s XFRM ESP-in-TCP subsystem to modify read-only file contents through the page cache and eventually trigger a root shell.&lt;/p&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;V12 Security PoC notes: &lt;a class=&#34;link&#34; href=&#34;https://github.com/v12-security/pocs/blob/main/fragnesia/README.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://github.com/v12-security/pocs/blob/main/fragnesia/README.md&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This post does not cover reproducible exploitation steps. It focuses on the operational risk and response path.&lt;/p&gt;
&lt;h2 id=&#34;how-it-relates-to-dirty-frag&#34;&gt;How It Relates to Dirty Frag
&lt;/h2&gt;&lt;p&gt;V12 Security classifies Fragnesia as part of the Dirty Frag vulnerability class. It is not the same bug as Dirty Frag, but it lives in a related attack surface: Linux kernel XFRM ESP-in-TCP.&lt;/p&gt;
&lt;p&gt;XFRM is the Linux kernel framework for IPsec processing. ESP-in-TCP is related to carrying ESP encrypted traffic over TCP. Fragnesia comes from logic around shared page fragments and socket buffer coalescing: in some cases, the kernel can lose track of the fact that a fragment is still shared, leaving room for controlled writes.&lt;/p&gt;
&lt;p&gt;This resembles the broader Dirty Pipe / Dirty Frag family of page-cache write issues. The concrete code paths differ, but the effect again lands on the page-cache copy of a read-only file.&lt;/p&gt;
&lt;h2 id=&#34;why-the-risk-is-high&#34;&gt;Why the Risk Is High
&lt;/h2&gt;&lt;p&gt;Fragnesia is dangerous for three reasons.&lt;/p&gt;
&lt;p&gt;First, it is a local privilege escalation. Once an attacker can run ordinary user-level code on a system, they may be able to become root. That matters especially on multi-user servers, container hosts, CI runners, shared development machines, VPS instances, and systems exposing shell access.&lt;/p&gt;
&lt;p&gt;Second, it does not rely on a traditional race condition. V12&amp;rsquo;s notes describe a path that drives ESP-in-TCP processing over file-backed pages already spliced into a socket buffer, allowing byte-level influence over page-cache contents. That makes the issue more practical than a purely theoretical bug.&lt;/p&gt;
&lt;p&gt;Third, it changes the page cache, not the on-disk file. The public notes use &lt;code&gt;/usr/bin/su&lt;/code&gt; as an example target. After successful exploitation, the file on disk is not permanently modified; the modified copy lives in memory. Integrity checks that only compare disk hashes may miss this.&lt;/p&gt;
&lt;p&gt;That is the awkward part for administrators: the file can look unchanged, but executing the polluted page-cache copy of a target binary may still trigger privilege escalation.&lt;/p&gt;
&lt;h2 id=&#34;known-affected-scope&#34;&gt;Known Affected Scope
&lt;/h2&gt;&lt;p&gt;V12 Security states that kernels affected by Dirty Frag and missing the relevant May 13, 2026 patches are also affected by Fragnesia. Publicly tested environments include Ubuntu 22.04, Ubuntu 24.04, and kernels such as &lt;code&gt;6.8.0-111-generic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;There are two important caveats.&lt;/p&gt;
&lt;p&gt;First, do not judge only by the distribution major version. Whether Ubuntu 22.04 or 24.04 is affected depends on the actual kernel patch state, not just the distribution name.&lt;/p&gt;
&lt;p&gt;Second, do not rely only on default AppArmor restrictions for unprivileged user namespaces. Ubuntu&amp;rsquo;s AppArmor restrictions can raise the bar, but the disclosure treats that as an additional bypass problem, not as a fix for the vulnerability itself.&lt;/p&gt;
&lt;p&gt;The reliable path is still to check distribution security advisories and kernel package updates.&lt;/p&gt;
&lt;h2 id=&#34;temporary-mitigation&#34;&gt;Temporary Mitigation
&lt;/h2&gt;&lt;p&gt;If a system cannot be upgraded immediately, first check whether it depends on the relevant protocol modules.&lt;/p&gt;
&lt;p&gt;V12 gives the same mitigation direction as Dirty Frag: if the system does not depend on IPsec ESP or RxRPC, administrators can consider disabling modules such as &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, and &lt;code&gt;rxrpc&lt;/code&gt;. This can affect networking features, so production systems should not do it blindly. Confirm whether the environment uses IPsec, VPNs, tunnels, or related kernel functionality.&lt;/p&gt;
&lt;p&gt;A safer response order is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check whether the distribution has published a kernel security update.&lt;/li&gt;
&lt;li&gt;Install the kernel patch and schedule a reboot first.&lt;/li&gt;
&lt;li&gt;If immediate upgrade is impossible, evaluate temporary module disabling.&lt;/li&gt;
&lt;li&gt;Prioritize multi-user systems and CI / build environments.&lt;/li&gt;
&lt;li&gt;Review unnecessary local accounts, shell access, container escape surface, and low-privilege execution entry points.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Disabling modules should not be treated as the final fix. It is only a way to reduce exposure while moving toward a patched kernel.&lt;/p&gt;
&lt;h2 id=&#34;if-exploitation-is-suspected&#34;&gt;If Exploitation Is Suspected
&lt;/h2&gt;&lt;p&gt;One key feature of Fragnesia is page-cache pollution. V12 notes that after exploitation, the target file&amp;rsquo;s page-cache copy may contain injected content, and later execution can still behave abnormally until the page is evicted or the system is rebooted.&lt;/p&gt;
&lt;p&gt;If exploitation is suspected, do at least the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Preserve logs and audit records as soon as possible.&lt;/li&gt;
&lt;li&gt;Check recent abnormal local logins, low-privilege user activity, suspicious processes, and root shell traces.&lt;/li&gt;
&lt;li&gt;Clear the relevant page cache or reboot directly.&lt;/li&gt;
&lt;li&gt;Upgrade to a fixed kernel.&lt;/li&gt;
&lt;li&gt;Verify key binaries, but do not rely only on disk hashes.&lt;/li&gt;
&lt;li&gt;Rotate potentially exposed credentials and keys.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For production servers, it is better to treat this as a potential local privilege escalation incident, not merely as a routine patch event.&lt;/p&gt;
&lt;h2 id=&#34;which-machines-should-come-first&#34;&gt;Which Machines Should Come First
&lt;/h2&gt;&lt;p&gt;The highest priority is not every Linux machine equally. Start with systems where attackers are most likely to obtain low-privilege code execution.&lt;/p&gt;
&lt;p&gt;High-priority environments include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multi-user login servers&lt;/li&gt;
&lt;li&gt;CI / CD runners&lt;/li&gt;
&lt;li&gt;Build machines&lt;/li&gt;
&lt;li&gt;Shared development machines&lt;/li&gt;
&lt;li&gt;Container hosts&lt;/li&gt;
&lt;li&gt;VPS and cloud servers&lt;/li&gt;
&lt;li&gt;Edge nodes exposing SSH&lt;/li&gt;
&lt;li&gt;Platforms running third-party scripts or plugins&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Closed, single-user machines with no external code execution entry point are still affected if vulnerable, but their urgency is lower.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Fragnesia matters not because it has a new name, but because it again pulls Linux local privilege escalation back into the difficult boundary between the page cache and kernel networking subsystems.&lt;/p&gt;
&lt;p&gt;For administrators, the important work is to confirm kernel patch status, understand whether ESP / RxRPC is in use, prioritize highly exposed machines, and remember that &amp;ldquo;the disk file is unchanged&amp;rdquo; does not mean &amp;ldquo;the system was unaffected.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;If a system is affected, the final answer is still to install the distribution&amp;rsquo;s kernel update as soon as possible. Temporary module disabling is only a bridge, not a replacement for the patch.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Dirty Frag CVE-2026-43284: Linux Local Privilege Escalation Risk and Mitigation Guide</title>
        <link>https://knightli.com/en/2026/05/09/dirty-frag-cve-2026-43284-linux-lpe-mitigation/</link>
        <pubDate>Sat, 09 May 2026 07:25:55 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/09/dirty-frag-cve-2026-43284-linux-lpe-mitigation/</guid>
        <description>&lt;p&gt;Dirty Frag is a set of Linux kernel local privilege escalation vulnerabilities disclosed in May 2026 with signs of active exploitation. Microsoft describes it as a post-compromise risk: after an attacker gains low-privileged code execution, the bug may be used to escalate to root. Ubuntu has also marked CVE-2026-43284 as High.&lt;/p&gt;
&lt;p&gt;The danger is not &amp;ldquo;remote one-click compromise&amp;rdquo;. The danger is that once an attacker gets in, they can expand control quickly. If they gain local execution through weak SSH credentials, a web shell, container escape, a low-privileged service account, or phishing-enabled remote access, Dirty Frag may let them obtain root and then disable security tools, read credentials, tamper with logs, move laterally, or persist.&lt;/p&gt;
&lt;h2 id=&#34;which-cves-are-involved&#34;&gt;Which CVEs are involved
&lt;/h2&gt;&lt;p&gt;Public information currently associates Dirty Frag mainly with two IDs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CVE-2026-43284&lt;/code&gt;: related to the Linux kernel xfrm/ESP path. Microsoft&amp;rsquo;s &lt;code&gt;esp4&lt;/code&gt; and &lt;code&gt;esp6&lt;/code&gt; references belong to this risk area.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CVE-2026-43500&lt;/code&gt;: Microsoft says this is related to &lt;code&gt;rxrpc&lt;/code&gt;, but as of May 8, 2026, the CVE had not yet been published in NVD and patch status was still evolving.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So do not check only one CVE. A safer approach is to review whether &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, &lt;code&gt;rxrpc&lt;/code&gt;, and related xfrm/IPsec functions are enabled, needed, and patched by your distribution.&lt;/p&gt;
&lt;h2 id=&#34;technical-overview&#34;&gt;Technical overview
&lt;/h2&gt;&lt;p&gt;According to Microsoft and Ubuntu, CVE-2026-43284 involves Linux kernel networking and memory-fragment handling, especially how shared page fragments are handled in the ESP/IPsec path.&lt;/p&gt;
&lt;p&gt;In simplified terms, data pages can be attached to network buffers through mechanisms such as splice. If later kernel paths treat those fragments as privately owned and safe to modify in place, in-place decryption or modification can happen where it should not. An attacker may manipulate page cache behavior and eventually achieve local privilege escalation.&lt;/p&gt;
&lt;p&gt;This has similarities to CopyFail (&lt;code&gt;CVE-2026-31431&lt;/code&gt;): both involve Linux page cache behavior, kernel data paths, and local privilege escalation. Dirty Frag is dangerous because it adds more attack paths and may be more reliable than traditional LPE exploits that depend on tight race windows.&lt;/p&gt;
&lt;h2 id=&#34;environments-to-prioritize&#34;&gt;Environments to prioritize
&lt;/h2&gt;&lt;p&gt;Dirty Frag is a local privilege escalation vulnerability, so the attacker must already be able to execute code locally. Prioritize:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linux servers with exposed SSH.&lt;/li&gt;
&lt;li&gt;Web servers where a web shell could be written.&lt;/li&gt;
&lt;li&gt;Multi-user login hosts, bastions, developer machines, and CI/CD runners.&lt;/li&gt;
&lt;li&gt;Container hosts, Kubernetes nodes, and OpenShift nodes.&lt;/li&gt;
&lt;li&gt;Systems using IPsec, VPN, xfrm, or RxRPC-related functionality.&lt;/li&gt;
&lt;li&gt;Servers running Ubuntu, RHEL, CentOS Stream, AlmaLinux, Fedora, openSUSE, and other mainstream distributions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If a server has no local multi-user access, no containers, and no exposed application path, risk is lower. But any system where an attacker might obtain a low-privileged shell should treat this as a high-priority kernel issue.&lt;/p&gt;
&lt;h2 id=&#34;patch-first&#34;&gt;Patch first
&lt;/h2&gt;&lt;p&gt;The safest fix is to install the kernel security update from your distribution and reboot into the new kernel.&lt;/p&gt;
&lt;p&gt;Ubuntu&amp;rsquo;s CVE page shows &lt;code&gt;CVE-2026-43284&lt;/code&gt; was published on May 8, 2026 and is rated High. Microsoft also says the Linux Kernel Organization has released fixes for &lt;code&gt;CVE-2026-43284&lt;/code&gt; and urges customers to apply patches promptly.&lt;/p&gt;
&lt;p&gt;Start by checking the system:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;uname -a
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat /etc/os-release
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then update the kernel using your distribution&amp;rsquo;s package manager:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt update &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo apt full-upgrade
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Or:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo dnf update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After updating, confirm that the system has rebooted into the new kernel:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;uname -r
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Installing kernel packages without rebooting leaves the old kernel running, so the vulnerability may still be present.&lt;/p&gt;
&lt;h2 id=&#34;interim-mitigation-disable-related-modules&#34;&gt;Interim mitigation: disable related modules
&lt;/h2&gt;&lt;p&gt;If patches are not yet available, or production cannot reboot immediately, evaluate whether you can temporarily disable the related modules. Ubuntu&amp;rsquo;s mitigation blocks &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, and &lt;code&gt;rxrpc&lt;/code&gt; from loading and unloads them if already loaded.&lt;/p&gt;
&lt;p&gt;Create modprobe blocking rules:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;install esp4 /bin/false&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /etc/modprobe.d/dirty-frag.conf
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;install esp6 /bin/false&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee -a /etc/modprobe.d/dirty-frag.conf
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;install rxrpc /bin/false&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee -a /etc/modprobe.d/dirty-frag.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Update initramfs so the modules are not loaded during early boot:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo update-initramfs -u -k all
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Unload currently loaded modules:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rmmod esp4 esp6 rxrpc 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Check whether the modules are still loaded:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;grep -qE &lt;span class=&#34;s1&#34;&gt;&amp;#39;^(esp4|esp6|rxrpc) &amp;#39;&lt;/span&gt; /proc/modules &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Affected modules are loaded&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Affected modules are NOT loaded&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If a module is in use, unloading may fail. In that case, the block rule may only take effect after reboot.&lt;/p&gt;
&lt;h2 id=&#34;evaluate-business-impact-before-disabling&#34;&gt;Evaluate business impact before disabling
&lt;/h2&gt;&lt;p&gt;Do not paste the mitigation blindly. &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, and xfrm/IPsec functionality may be used by VPNs, tunnels, encrypted networking, Kubernetes/container networking, or enterprise network configurations. &lt;code&gt;rxrpc&lt;/code&gt; may also affect workloads that depend on that protocol.&lt;/p&gt;
&lt;p&gt;Before using the mitigation in production, check at least:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;lsmod &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep -E &lt;span class=&#34;s1&#34;&gt;&amp;#39;^(esp4|esp6|rxrpc|xfrm)&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ip xfrm state
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ip xfrm policy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you depend on IPsec VPN or related kernel networking, disabling modules may break connectivity. In that case, schedule kernel patching and a maintenance reboot rather than relying on module blocking for long.&lt;/p&gt;
&lt;h2 id=&#34;do-not-skip-post-compromise-checks&#34;&gt;Do not skip post-compromise checks
&lt;/h2&gt;&lt;p&gt;Microsoft specifically notes that mitigation does not necessarily undo changes already made by successful exploitation. If an attacker already gained root, they may have left persistence, modified files, altered logs, or accessed session data.&lt;/p&gt;
&lt;p&gt;At minimum, check:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;journalctl -k --since &lt;span class=&#34;s2&#34;&gt;&amp;#34;24 hours ago&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep -Ei &lt;span class=&#34;s2&#34;&gt;&amp;#34;dirty|frag|exploit|segfault|xfrm|rxrpc|esp&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;last -a
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;lastlog
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo find /tmp /var/tmp /dev/shm -type f -mtime -3 -ls
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo find / -perm -4000 -type f -mtime -7 -ls 2&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Also review:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Abnormal &lt;code&gt;su&lt;/code&gt;, &lt;code&gt;sudo&lt;/code&gt;, or SUID/SGID process launches.&lt;/li&gt;
&lt;li&gt;Newly created ELF executables.&lt;/li&gt;
&lt;li&gt;Suspicious PHP, JSP, or ASP files in web directories.&lt;/li&gt;
&lt;li&gt;Changes to SSH authorized_keys.&lt;/li&gt;
&lt;li&gt;New persistence in systemd services, cron, or rc.local.&lt;/li&gt;
&lt;li&gt;Suspicious privileged containers or host mounts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If exploitation is suspected, isolate the host, preserve evidence, rotate credentials, and then clean up. Do not assume that unloading modules or clearing caches makes the system safe.&lt;/p&gt;
&lt;h2 id=&#34;about-drop_caches&#34;&gt;About drop_caches
&lt;/h2&gt;&lt;p&gt;Microsoft mentions that in some post-exploitation integrity verification scenarios, cache clearing may be evaluated:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /proc/sys/vm/drop_caches
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This is not a vulnerability fix and not an incident cleanup command. Dropping caches can increase disk I/O and affect production performance. Use it only as an auxiliary step after understanding the impact. The real fix remains patching, rebooting, verifying integrity, and checking persistence.&lt;/p&gt;
&lt;h2 id=&#34;recommended-response-order&#34;&gt;Recommended response order
&lt;/h2&gt;&lt;p&gt;For production environments, a reasonable response sequence is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Inventory Linux assets and kernel versions.&lt;/li&gt;
&lt;li&gt;Prioritize systems with exposed SSH, web workloads, container hosts, and multi-user access.&lt;/li&gt;
&lt;li&gt;Patch and reboot systems that can be restarted quickly.&lt;/li&gt;
&lt;li&gt;For systems that cannot yet patch or reboot, evaluate disabling &lt;code&gt;esp4&lt;/code&gt;, &lt;code&gt;esp6&lt;/code&gt;, and &lt;code&gt;rxrpc&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Increase monitoring for &lt;code&gt;su&lt;/code&gt;, SUID/SGID activity, suspicious ELF files, web shells, and container escape indicators.&lt;/li&gt;
&lt;li&gt;Run post-compromise checks and rotate credentials on hosts that may already have been exploited.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Dirty Frag is not a &amp;ldquo;remote one-click&amp;rdquo; vulnerability, but it significantly increases post-compromise risk. If an attacker can run code locally with low privileges, &lt;code&gt;CVE-2026-43284&lt;/code&gt; and the related &lt;code&gt;rxrpc&lt;/code&gt; attack surface may allow escalation to root.&lt;/p&gt;
&lt;p&gt;For administrators, the priority is not studying PoCs. The priority is to confirm kernel exposure, install distribution security updates and reboot, evaluate module-blocking mitigations before the patch window, and inspect exposed or suspicious systems for integrity and persistence issues.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.microsoft.com/en-us/security/blog/2026/05/08/active-attack-dirty-frag-linux-vulnerability-expands-post-compromise-risk/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Microsoft Security Blog: Active attack: Dirty Frag Linux vulnerability expands post-compromise risk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://ubuntu.com/security/CVE-2026-43284&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Ubuntu: CVE-2026-43284&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://ubuntu.com/blog/dirty-frag-linux-vulnerability-fixes-available&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Ubuntu: Dirty Frag Linux kernel local privilege escalation vulnerability mitigations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Btrfs Scrub Guide: Data Verification, Auto-Repair, and Regular Maintenance</title>
        <link>https://knightli.com/en/2026/05/09/btrfs-scrub-check-repair-guide/</link>
        <pubDate>Sat, 09 May 2026 07:11:01 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/09/btrfs-scrub-check-repair-guide/</guid>
        <description>&lt;p&gt;Btrfs scrub is one of the most important and most misunderstood Btrfs maintenance features. It is not fsck in the traditional sense. It is an online validation pass that reads filesystem data and metadata, verifies checksums, superblocks, metadata block headers, and disk read errors, and tries to repair damage when a known good replica exists.&lt;/p&gt;
&lt;p&gt;If you use Btrfs on a NAS, home server, backup disk, or multi-device array, scrub should be part of regular maintenance. Its value is not &amp;ldquo;run it after disaster&amp;rdquo;. Its value is finding silent corruption early, while disks are still readable and good replicas still exist.&lt;/p&gt;
&lt;h2 id=&#34;what-scrub-checks&#34;&gt;What scrub checks
&lt;/h2&gt;&lt;p&gt;According to the official Btrfs documentation, scrub scans filesystem data and metadata and mainly checks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data block checksum errors.&lt;/li&gt;
&lt;li&gt;Basic super block errors.&lt;/li&gt;
&lt;li&gt;Basic metadata block header errors.&lt;/li&gt;
&lt;li&gt;Disk read errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On filesystems using replicated block group profiles such as RAID1, scrub on a read-write mount can automatically repair some damage. The repair is not magic recovery. Btrfs copies verified good data from another replica.&lt;/p&gt;
&lt;p&gt;This is the key point: scrub repair depends on having a known good copy. On a single disk with only one copy of the data, scrub can detect checksum errors, but it usually cannot restore the original content by itself.&lt;/p&gt;
&lt;h2 id=&#34;common-commands&#34;&gt;Common commands
&lt;/h2&gt;&lt;p&gt;Start scrub on a mount point:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub start /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Run it in the foreground, useful for manual observation:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub start -B /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Check status:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub status /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Cancel a running scrub:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub cancel /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Resume an interrupted scrub:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub resume /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you specify a Btrfs mount path, Btrfs scrubs all devices in that filesystem in parallel. If you specify a device, only that device is scrubbed. But if the replica on the specified device cannot be read or verified, Btrfs still tries to read a good copy from another device.&lt;/p&gt;
&lt;h2 id=&#34;scrub-is-not-fsck&#34;&gt;Scrub is not fsck
&lt;/h2&gt;&lt;p&gt;This is the easiest mistake to make. Scrub is not &lt;code&gt;btrfs check&lt;/code&gt;, nor a traditional filesystem checker.&lt;/p&gt;
&lt;p&gt;Scrub can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use checksums to detect data or metadata corruption.&lt;/li&gt;
&lt;li&gt;Auto-repair when another reliable replica exists.&lt;/li&gt;
&lt;li&gt;Detect disk read errors and some basic structural errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Scrub cannot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rebuild data when no good replica exists.&lt;/li&gt;
&lt;li&gt;Replace offline filesystem checking.&lt;/li&gt;
&lt;li&gt;Repair all complex tree-structure corruption.&lt;/li&gt;
&lt;li&gt;Guarantee that application-level file contents are correct.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If filesystem structures are badly damaged, tools such as &lt;code&gt;btrfs check&lt;/code&gt; may be needed under expert guidance. Do not treat scrub as a universal repair command.&lt;/p&gt;
&lt;h2 id=&#34;nocow-file-risks&#34;&gt;NOCOW file risks
&lt;/h2&gt;&lt;p&gt;The Btrfs documentation calls out an important caveat: setting the &lt;code&gt;NOCOW&lt;/code&gt; attribute with &lt;code&gt;chattr +C&lt;/code&gt; currently also enables &lt;code&gt;NODATASUM&lt;/code&gt;. That means the file data itself has no checksum.&lt;/p&gt;
&lt;p&gt;Scrub can still validate and repair metadata for these files, but it cannot validate their data contents. This is especially risky in multi-replica setups: if one copy of a NOCOW file is damaged, Btrfs has no data checksum to tell which replica is good, so it may return bad contents to user space.&lt;/p&gt;
&lt;p&gt;Some applications use &lt;code&gt;+C&lt;/code&gt; by default for performance. systemd journal and some libvirt storage pool scenarios are notable examples. For VM images, databases, and log directories, this can make sense for performance, but it also means you cannot expect scrub to protect their data contents the same way it protects normal COW files.&lt;/p&gt;
&lt;h2 id=&#34;read-only-scrub-can-still-write&#34;&gt;Read-only scrub can still write
&lt;/h2&gt;&lt;p&gt;Another counterintuitive point: running read-only scrub on a read-write mounted filesystem can still cause some writes.&lt;/p&gt;
&lt;p&gt;The official documentation explains that this is due to a design limitation around avoiding races between marking block groups read-only and writing back block group items. In other words, if you want scrub to perform no writes at all, you need to run read-only scrub on a read-only mounted filesystem. Adding a read-only scrub option on a read-write mount is not enough.&lt;/p&gt;
&lt;p&gt;For normal users, this means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Routine online scrub can run on a read-write mount.&lt;/li&gt;
&lt;li&gt;For forensics, failure analysis, or very conservative read-only checks, confirm the mount state first.&lt;/li&gt;
&lt;li&gt;Do not interpret read-only scrub as absolutely zero-write.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;interruption-and-resume&#34;&gt;Interruption and resume
&lt;/h2&gt;&lt;p&gt;On newer kernels, scrub may be interrupted by events such as suspend, hibernate, filesystem freezing, cgroup freezing, and pending signals. After such an interruption, the running scrub is cancelled, but it can be resumed with &lt;code&gt;btrfs scrub resume&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Scrub status is recorded under:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/var/lib/btrfs/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;File names usually look like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;scrub.status.UUID
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;scrub.progress.UUID
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The status file is updated periodically. A resumed scrub continues from the last saved position instead of starting completely over.&lt;/p&gt;
&lt;h2 id=&#34;how-often-to-run-it&#34;&gt;How often to run it
&lt;/h2&gt;&lt;p&gt;The official recommendation is once per month. In practice, adjust based on data importance and disk condition.&lt;/p&gt;
&lt;p&gt;Common schedules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Home NAS: once per month.&lt;/li&gt;
&lt;li&gt;Backup disks: after long attachment sessions or once per month.&lt;/li&gt;
&lt;li&gt;Important multi-device arrays: once per month, or more often if needed.&lt;/li&gt;
&lt;li&gt;New disk migration or suspected disk problems: run immediately after migration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Scrub may use around 80% of device bandwidth on an idle filesystem, so do not run it during peak workload. On HDD arrays, latency can rise noticeably during scrub. On SSDs, it still adds read amplification and background pressure.&lt;/p&gt;
&lt;h2 id=&#34;limiting-scrub-bandwidth&#34;&gt;Limiting scrub bandwidth
&lt;/h2&gt;&lt;p&gt;In the past, &lt;code&gt;ionice&lt;/code&gt; was often used to reduce scrub impact on foreground I/O. The official documentation warns that this is not supported equally by all I/O schedulers. CFQ is no longer generally available. BFQ supports the relevant priority behavior, but you should understand it before using it. For common schedulers such as &lt;code&gt;mq-deadline&lt;/code&gt;, cgroup2 I/O controller or Btrfs-specific limits are usually better.&lt;/p&gt;
&lt;p&gt;Example using systemd to limit read bandwidth:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemd-run -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;IOReadBandwidthMax=/dev/sdx 10M&amp;#34;&lt;/span&gt; btrfs scrub start -B /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Since Linux 5.14, Btrfs can set per-device scrub limits through sysfs:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; 100m &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /sys/fs/btrfs/FSID/devinfo/DEVID/scrub_speed_max
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Show current limits:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub limit /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This setting is not persistent and disappears when the filesystem is unmounted. Replace &lt;code&gt;FSID&lt;/code&gt; and &lt;code&gt;DEVID&lt;/code&gt; with the actual values for your system. You can start by checking:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs filesystem show /
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ls /sys/fs/btrfs/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;practical-maintenance-workflow&#34;&gt;Practical maintenance workflow
&lt;/h2&gt;&lt;p&gt;A reasonable Btrfs maintenance workflow can look like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub start -B /
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs scrub status /
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo btrfs device stats /
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;dmesg -T &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep -Ei &lt;span class=&#34;s2&#34;&gt;&amp;#34;btrfs|checksum|i/o error|read error&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If scrub reports corrected errors, Btrfs has repaired data from a good replica, but you should not ignore it. Continue checking disk SMART, cables, power, controllers, and Btrfs device stats.&lt;/p&gt;
&lt;p&gt;If scrub reports uncorrectable errors, Btrfs could not find a good copy. Back up whatever can still be read, identify the affected files or device, and replace hardware or restore from backup as needed.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Btrfs scrub has a clear role: online data verification and replica repair. It is not fsck, and it is not backup.&lt;/p&gt;
&lt;p&gt;It works best on Btrfs filesystems with checksums and redundant replicas, where it can regularly find silent corruption and restore from good copies. It cannot protect NOCOW file data without checksums, and it cannot recover damaged contents without a good replica.&lt;/p&gt;
&lt;p&gt;If you store important data on Btrfs, run scrub monthly and use it together with SMART, device stats, backups, and alerting. Reliable data safety comes from checksums, redundancy, monitoring, and backups working together, not from a single command.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://btrfs.readthedocs.io/en/latest/Scrub.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Btrfs official documentation: Scrub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Does F2FS Freeze an HC620 SMR Drive? Linux SMR Disk Troubleshooting Guide</title>
        <link>https://knightli.com/en/2026/05/08/hc620-smr-f2fs-io-wait-freeze/</link>
        <pubDate>Fri, 08 May 2026 22:34:39 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/08/hc620-smr-f2fs-io-wait-freeze/</guid>
        <description>&lt;p&gt;When an HC620 helium-filled SMR drive is used with F2FS, symptoms such as system freezes, unresponsive applications, and sustained high &lt;code&gt;iowait&lt;/code&gt; are usually not caused by one bad option. They are the result of device behavior colliding with filesystem policy.&lt;/p&gt;
&lt;p&gt;Western Digital Ultrastar DC HC620 is a Host-managed SMR drive. It is better suited to sequential writes, zoned-aware workloads, and software stacks that understand the device constraints. F2FS is a log-structured filesystem designed for flash storage. Although it can turn many random writes into sequential writes, heavy garbage collection, metadata updates, or low free space can still push a mechanical SMR drive into long internal maintenance cycles.&lt;/p&gt;
&lt;h2 id=&#34;confirm-the-problem-first&#34;&gt;Confirm the problem first
&lt;/h2&gt;&lt;p&gt;Start with these checks:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;iostat -x &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;iotop -oPa
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;dmesg -T &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep -Ei &lt;span class=&#34;s2&#34;&gt;&amp;#34;f2fs|blk|zoned|reset|timeout|I/O error&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If disk &lt;code&gt;%util&lt;/code&gt; stays close to 100%, &lt;code&gt;await&lt;/code&gt; is high, and many processes are stuck in &lt;code&gt;D&lt;/code&gt; state, the bottleneck is probably block I/O.&lt;/p&gt;
&lt;p&gt;Then check whether the drive is exposed as a zoned device:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;lsblk -o NAME,MODEL,SIZE,ROTA,ZONED,SCHED,MOUNTPOINTS
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat /sys/block/sdX/queue/zoned
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If it is Host-managed SMR, ordinary filesystems and random-write workloads may perform poorly. Unlike consumer drive-managed SMR disks, this class depends more on host software understanding the write rules.&lt;/p&gt;
&lt;h2 id=&#34;why-f2fs-can-amplify-the-stall&#34;&gt;Why F2FS can amplify the stall
&lt;/h2&gt;&lt;p&gt;SMR cannot overwrite arbitrary locations as freely as CMR disks. Shingled tracks overlap to increase capacity. When writes become random, overwrites are frequent, or cache is exhausted, the drive must perform additional data movement and cleanup.&lt;/p&gt;
&lt;p&gt;F2FS was built for NAND flash. It uses log-structured writes and reclaims space through segment cleaning and garbage collection. On SSDs this is natural because there is no mechanical seek. On mechanical disks, especially SMR disks, GC-related reads and writes can turn into severe tail latency.&lt;/p&gt;
&lt;p&gt;When F2FS background GC, foreground writes, checkpoints, metadata updates, and the drive&amp;rsquo;s own SMR cleanup overlap, the I/O queue can stay saturated for a long time. From user space, copying files, deleting directories, downloading, extracting archives, or database writes may make the whole system feel frozen.&lt;/p&gt;
&lt;h2 id=&#34;start-with-conservative-mount-options&#34;&gt;Start with conservative mount options
&lt;/h2&gt;&lt;p&gt;If you cannot migrate immediately, first adjust &lt;code&gt;/etc/fstab&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;UUID=xxxx  /data  f2fs  defaults,nodiscard,active_logs=2,gc_merge,flush_merge,lazytime  0  0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;What these options do:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;nodiscard&lt;/code&gt;: disables real-time discard. Mechanical disks usually do not need frequent TRIM/discard behavior like SSDs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;active_logs=2&lt;/code&gt;: F2FS supports 2, 4, or 6 active logs, and the default is commonly 6. Reducing it to 2 can reduce seek pressure from concurrent logs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gc_merge&lt;/code&gt;: lets the background GC thread handle some foreground GC requests, reducing stalls when a process triggers slow GC.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;flush_merge&lt;/code&gt;: merges cache flush requests, which can help when the device handles flush slowly.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;lazytime&lt;/code&gt;: reduces metadata writes caused by some access time updates.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do not treat &lt;code&gt;checkpoint=disable&lt;/code&gt; as a normal tuning switch. It may reduce checkpoint pressure, but it increases risk after crashes or power loss. Kernel documentation also notes that the filesystem still needs GC while checkpoint is disabled to ensure usable space. Unless you understand the tradeoff clearly, do not use it as a long-term performance fix.&lt;/p&gt;
&lt;h2 id=&#34;tune-the-io-scheduler&#34;&gt;Tune the I/O scheduler
&lt;/h2&gt;&lt;p&gt;Mechanical disks and SMR disks often benefit from request merging and latency control. Check the current scheduler:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat /sys/block/sdX/queue/scheduler
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Try switching to &lt;code&gt;mq-deadline&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; mq-deadline &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /sys/block/sdX/queue/scheduler
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For desktop interaction, &lt;code&gt;bfq&lt;/code&gt; is also worth testing. Do not look only at sequential throughput. Watch whether freezes are reduced, &lt;code&gt;await&lt;/code&gt; drops, and the system feels more responsive.&lt;/p&gt;
&lt;h2 id=&#34;limit-f2fs-background-gc&#34;&gt;Limit F2FS background GC
&lt;/h2&gt;&lt;p&gt;The F2FS sysfs path depends on the actual device name. Check it first:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ls /sys/fs/f2fs/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then adjust the GC interval for the matching device:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;60000&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /sys/fs/f2fs/sdX/gc_min_sleep_time
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;120000&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /sys/fs/f2fs/sdX/gc_max_sleep_time
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Here &lt;code&gt;sdX&lt;/code&gt; is only an example. The actual name may be &lt;code&gt;sda1&lt;/code&gt;, &lt;code&gt;dm-0&lt;/code&gt;, or something else. Increasing GC sleep time reduces how often background GC competes for I/O, but space reclaim becomes slower. If the disk is nearly full, foreground GC may still be triggered, so keep enough free space.&lt;/p&gt;
&lt;h2 id=&#34;better-long-term-options&#34;&gt;Better long-term options
&lt;/h2&gt;&lt;p&gt;If the drive stores important data, the safest long-term answer is to back up and change the filesystem, or use a more suitable drive.&lt;/p&gt;
&lt;p&gt;For large mechanical disks, consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;XFS: good for large files, backup drives, media libraries, archives, and sequential-write workloads.&lt;/li&gt;
&lt;li&gt;EXT4: stable behavior, broad compatibility, and abundant troubleshooting material.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the drive is Host-managed SMR, also confirm that your kernel, controller, filesystem, and application stack truly support zoned block devices. Otherwise, using it like a normal random-write disk can lead to unpredictable long stalls.&lt;/p&gt;
&lt;h2 id=&#34;practical-advice&#34;&gt;Practical advice
&lt;/h2&gt;&lt;p&gt;This class of disk is better suited to cold data, archives, backups, media files, and sequential writes. It is a poor fit for download caches, container images, VM disks, databases, frequent archive extraction, and small-file random writes.&lt;/p&gt;
&lt;p&gt;If you must keep using F2FS, at least do this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Disable real-time discard.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;active_logs=2&lt;/code&gt; to reduce concurrent logs.&lt;/li&gt;
&lt;li&gt;Enable &lt;code&gt;gc_merge&lt;/code&gt; and &lt;code&gt;flush_merge&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Keep plenty of free space.&lt;/li&gt;
&lt;li&gt;Avoid placing downloads, databases, and VM images on this disk.&lt;/li&gt;
&lt;li&gt;Watch &lt;code&gt;iostat -x 1&lt;/code&gt;, not just average speed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In short, HC620 + F2FS freezes are the result of SMR write constraints, F2FS GC, and mechanical disk tail latency stacking together. Short-term mitigation is mount-option tuning, scheduler tuning, and background GC limits. The long-term fix is to migrate to XFS/EXT4, or use the SMR drive only for workloads it actually suits.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.kernel.org/filesystems/f2fs.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Linux Kernel Documentation: F2FS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://documents.westerndigital.com/content/dam/doc-library/en_us/assets/public/western-digital/product/data-center-drives/ultrastar-dc-hc600-series/data-sheet-ultrastar-dc-hc620.pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Western Digital Ultrastar DC HC620 Data Sheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Canonical Ubuntu AI Roadmap: Local Inference First, No Forced Integration</title>
        <link>https://knightli.com/en/2026/05/08/ubuntu-ai-roadmap-local-inference-opt-in/</link>
        <pubDate>Fri, 08 May 2026 22:23:46 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/08/ubuntu-ai-roadmap-local-inference-opt-in/</guid>
        <description>&lt;p&gt;Canonical&amp;rsquo;s recent Ubuntu AI roadmap is notable less for &amp;ldquo;putting AI everywhere&amp;rdquo; and more for trying a restrained path: AI features are layered, disabled by default, enabled only by explicit user choice, and designed to prefer local inference.&lt;/p&gt;
&lt;p&gt;That stands apart from some of the controversy around system-level AI in Windows and macOS. Ubuntu is not trying to build an unavoidable global AI layer, nor is it promising one universal AI kill switch. Instead, the plan is to expose AI as separate tools, letting users decide whether to install them, enable them, choose a model, and allow data to leave the machine.&lt;/p&gt;
&lt;h2 id=&#34;first-the-timeline-not-ubuntu-2604-lts&#34;&gt;First, the timeline: not Ubuntu 26.04 LTS
&lt;/h2&gt;&lt;p&gt;The roadmap points mainly to Ubuntu 26.10 &amp;ldquo;Questing Quokka&amp;rdquo;, expected on October 9, 2026. Canonical plans to introduce some AI tooling as experimental previews, not as default features in Ubuntu 26.04 LTS.&lt;/p&gt;
&lt;p&gt;That matters. LTS releases are meant for stability, enterprise deployment, and long-term maintenance. It would be unusual to place exploratory desktop AI features into an LTS default experience. A more reasonable path is to test them first in a regular release such as 26.10, gather feedback from developers and early users, and then decide what belongs in later long-term releases.&lt;/p&gt;
&lt;h2 id=&#34;local-inference-first-cloud-only-by-choice&#34;&gt;Local inference first, cloud only by choice
&lt;/h2&gt;&lt;p&gt;One core principle is local inference first. By default, inference should happen on the user&amp;rsquo;s machine. Requests should leave the machine only when the user explicitly configures a cloud provider, a self-hosted server, or an enterprise model service.&lt;/p&gt;
&lt;p&gt;The reason is practical: system-level AI can easily touch command output, logs, file paths, errors, and system configuration. Sending that information to the cloud automatically, even to explain an error, creates obvious privacy and compliance risks.&lt;/p&gt;
&lt;p&gt;So Ubuntu&amp;rsquo;s AI direction is not a cloud AI gateway. It is closer to a pluggable inference layer. Users may choose a local model, an internal company service, or a Canonical-managed service when needed. The important part is avoiding lock-in to one model vendor.&lt;/p&gt;
&lt;h2 id=&#34;ai-cli-start-with-terminal-assistance&#34;&gt;AI CLI: start with terminal assistance
&lt;/h2&gt;&lt;p&gt;One of the first practical features may be the AI Command Line Helper, often referred to as &lt;code&gt;ai-cli&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It is not meant to replace the shell or automatically run risky commands. Its job is to help users understand commands, logs, systemd units, error output, and system state. For example, it could explain why a service failed to start, or clarify what a command-line flag means.&lt;/p&gt;
&lt;p&gt;This fits Ubuntu&amp;rsquo;s audience well. Many Ubuntu desktop and server users already live in the terminal. Instead of starting with a flashy chat window, it makes sense to put AI into error analysis, command explanation, and operations assistance.&lt;/p&gt;
&lt;p&gt;The safety boundary must be clear. Logs may contain tokens, internal hosts, usernames, file paths, key fragments, or business information. Even with local inference by default, tools should encourage redaction. If a user chooses a cloud backend, the UI must make clear what will be sent.&lt;/p&gt;
&lt;h2 id=&#34;settings-agent-natural-language-system-settings&#34;&gt;Settings Agent: natural-language system settings
&lt;/h2&gt;&lt;p&gt;Another direction is a Settings Agent that lets users query or change system settings in natural language.&lt;/p&gt;
&lt;p&gt;This sounds simple but is easy to get wrong. A mature Settings Agent should not scrape the screen, guess buttons, and simulate clicks. It should use controlled internal APIs: what it can read, what it can change, when confirmation is required, and how failures are rolled back.&lt;/p&gt;
&lt;p&gt;That makes it more likely to be a post-26.10 direction than a complete immediate feature. If done well, it could lower the barrier for normal users to configure desktop Linux. If done too aggressively, it becomes a new security risk.&lt;/p&gt;
&lt;h2 id=&#34;why-not-a-universal-ai-kill-switch&#34;&gt;Why not a universal AI kill switch?
&lt;/h2&gt;&lt;p&gt;Many users worry that once vendors add AI to an operating system, AI appears everywhere and becomes hard to disable. So the natural question is whether Ubuntu should provide a global AI kill switch.&lt;/p&gt;
&lt;p&gt;Canonical&amp;rsquo;s position is that if AI features are opt-in, layered, and independently installable and configurable, a global kill switch is not the first priority. In other words, the design should avoid the pattern of &amp;ldquo;enabled by default, deeply embedded, then users have to disable it.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Whether that is enough depends on implementation. If AI tools are not enabled by default, do not connect to remote services by default, do not collect data automatically, and each feature has clear controls, users should not need to hunt through hidden settings to turn AI off.&lt;/p&gt;
&lt;h2 id=&#34;what-it-means-for-developers-and-enterprises&#34;&gt;What it means for developers and enterprises
&lt;/h2&gt;&lt;p&gt;For developers, AI CLI tools can reduce the time spent reading documentation, parsing logs, and diagnosing system problems. They do not replace engineering judgment; they automate a lot of &amp;ldquo;help me understand this output&amp;rdquo; work.&lt;/p&gt;
&lt;p&gt;For enterprises, local inference and pluggable backends matter more. Many companies cannot send source code, logs, customer data, or infrastructure details to public model services. If Ubuntu can connect system-level AI with local models, private inference services, and enterprise permissions, it may offer useful assistance in compliant environments.&lt;/p&gt;
&lt;p&gt;This is also an opening for Linux desktops and workstations. Windows and macOS can more easily fold AI into vendor ecosystems. Ubuntu&amp;rsquo;s advantage is openness, auditability, replaceability, and self-hosting. If Canonical preserves those principles, AI could strengthen the professional Linux experience.&lt;/p&gt;
&lt;h2 id=&#34;do-not-overread-it&#34;&gt;Do not overread it
&lt;/h2&gt;&lt;p&gt;It is too early to say that Ubuntu will preinstall a specific small model, that Ubuntu 26.04 will include an AI audit mode, or that there will be a fixed &lt;code&gt;ubuntu-ai&lt;/code&gt; command. The clearer public information is about direction, not final product shape.&lt;/p&gt;
&lt;p&gt;The safer reading is this: Canonical is preparing a system-level AI tooling framework for Ubuntu, starting with command-line help, settings assistance, local inference, and backend choice. The default posture is user choice, not vendor choice.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;The important part of Ubuntu&amp;rsquo;s AI roadmap is not that Ubuntu is &amp;ldquo;joining the AI wave&amp;rdquo;. It is the attempt to define a more restrained model for AI in open source operating systems: intelligence can become infrastructure, but privacy, control, and user choice must come first.&lt;/p&gt;
&lt;p&gt;If the experimental features in 26.10 live up to those principles, Ubuntu may take a different path from consumer operating systems: AI not as an unavoidable system ad slot, but as a selectable, replaceable, and auditable productivity layer.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.tomshardware.com/software/operating-systems/ubuntus-ai-roadmap-revealed-universal-ai-kill-switch-and-forced-ai-integration-are-not-part-of-the-plan-cloud-tracking-local-inference-and-agentic-system-tools-take-center-stage&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Tom&amp;rsquo;s Hardware: Ubuntu&amp;rsquo;s AI roadmap revealed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://discourse.ubuntu.com/t/the-future-of-ai-in-ubuntu/81130&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Ubuntu Discourse: The future of AI in Ubuntu&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Choosing a Linux Desktop Distribution in 2026: Ubuntu, Deepin/UOS, Linux Mint, and Fedora Compared</title>
        <link>https://knightli.com/en/2026/05/07/linux-desktop-distro-comparison-2026/</link>
        <pubDate>Thu, 07 May 2026 21:17:11 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/07/linux-desktop-distro-comparison-2026/</guid>
        <description>&lt;p&gt;When choosing a Linux desktop distribution in 2026, the key is not which one is the most &amp;ldquo;pure&amp;rdquo; or the most &amp;ldquo;advanced,&amp;rdquo; but which one you can comfortably use every day.&lt;/p&gt;
&lt;p&gt;Desktop Linux is different from server Linux. Servers focus more on lifecycle, package stability, and operations standards. Desktops also depend on interface, drivers, app stores, input methods, office software, graphics cards, Bluetooth, audio, touchpads, external monitors, and small daily annoyances.&lt;/p&gt;
&lt;p&gt;If you want less fuss, start with Ubuntu, Linux Mint, and Deepin/UOS. If you are a developer and are willing to use a newer software stack with a faster technology cadence, Fedora deserves attention.&lt;/p&gt;
&lt;h2 id=&#34;quick-conclusion&#34;&gt;Quick Conclusion
&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Distribution&lt;/th&gt;
          &lt;th&gt;Best For&lt;/th&gt;
          &lt;th&gt;Main Strengths&lt;/th&gt;
          &lt;th&gt;Main Notes&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Ubuntu 26.04 LTS&lt;/td&gt;
          &lt;td&gt;Beginners, developers, main desktop&lt;/td&gt;
          &lt;td&gt;Most documentation, complete ecosystem, strong hardware and software support&lt;/td&gt;
          &lt;td&gt;Default GNOME takes adjustment; not everyone likes the Snap strategy&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Deepin / UOS&lt;/td&gt;
          &lt;td&gt;Chinese users, localization environments, users who value visual experience&lt;/td&gt;
          &lt;td&gt;Beautiful and easy to use, strong Chinese localization, good domestic software and enterprise compatibility&lt;/td&gt;
          &lt;td&gt;Community and commercial editions have different positioning; update strategy must be understood&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Linux Mint&lt;/td&gt;
          &lt;td&gt;Windows-to-Linux migration, stability-first users&lt;/td&gt;
          &lt;td&gt;Familiar UI, extremely easy to use, stable Cinnamon desktop&lt;/td&gt;
          &lt;td&gt;Slower new-technology cadence; default stack is not aggressive&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Fedora&lt;/td&gt;
          &lt;td&gt;Developers and Linux new-technology users&lt;/td&gt;
          &lt;td&gt;New kernel, new GNOME, fast adoption of new technologies&lt;/td&gt;
          &lt;td&gt;Frequent updates; less comfortable than LTS for conservative stability users&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In one sentence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Beginners and main desktop&lt;/strong&gt;: Ubuntu 26.04 LTS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chinese and localization experience&lt;/strong&gt;: Deepin / UOS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Smooth Windows migration&lt;/strong&gt;: Linux Mint.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developers and new-technology exploration&lt;/strong&gt;: Fedora.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;ubuntu-2604-lts-the-all-round-desktop&#34;&gt;Ubuntu 26.04 LTS: The All-Round Desktop
&lt;/h2&gt;&lt;p&gt;Ubuntu 26.04 LTS &lt;code&gt;Resolute Raccoon&lt;/code&gt; was released in April 2026. As an LTS release, it is suitable as a long-term main desktop.&lt;/p&gt;
&lt;p&gt;Ubuntu&amp;rsquo;s advantage is direct: it has the most documentation, the most tutorials, and the easiest answers to search for when something goes wrong. Whether you want VS Code, Docker, NVIDIA drivers, Steam, Chrome, Slack, JetBrains, CUDA, Python, or Node.js, Ubuntu is usually a primary target for vendors and the community.&lt;/p&gt;
&lt;p&gt;Ubuntu 26.04 LTS is suitable for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;people seriously using Linux desktop for the first time;&lt;/li&gt;
&lt;li&gt;users who want a long-term main system;&lt;/li&gt;
&lt;li&gt;developers who need a stable Linux environment;&lt;/li&gt;
&lt;li&gt;users who need lots of tutorials, drivers, and commercial software support;&lt;/li&gt;
&lt;li&gt;users who want to connect desktop, server, and WSL ecosystems.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Its strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;long LTS lifecycle;&lt;/li&gt;
&lt;li&gt;mature official images and documentation;&lt;/li&gt;
&lt;li&gt;modern GNOME desktop, with good touchpad and multi-monitor experience;&lt;/li&gt;
&lt;li&gt;complete driver, cloud, container, and development-tool ecosystem;&lt;/li&gt;
&lt;li&gt;lowest search cost when problems appear.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The main note is that Ubuntu uses GNOME by default, which differs from the Windows desktop model. Beginners may need to adapt to the activities overview, Dock, workspaces, and app launcher. Ubuntu also continues to promote Snap, and some users dislike Snap&amp;rsquo;s launch speed, package-management model, and ecosystem strategy.&lt;/p&gt;
&lt;p&gt;My take: if you do not know which desktop distribution to choose, Ubuntu 26.04 LTS remains the safest default answer. It is not the best in every single direction, but its overall score is the highest.&lt;/p&gt;
&lt;h2 id=&#34;deepin--uos-chinese-desktop-experience-and-localization-compatibility&#34;&gt;Deepin / UOS: Chinese Desktop Experience and Localization Compatibility
&lt;/h2&gt;&lt;p&gt;The strength of Deepin and UOS is that they better understand Chinese desktop users.&lt;/p&gt;
&lt;p&gt;Deepin 25 was released in 2025 and continues to receive updates in 2026 through versions such as deepin 25.1. Official notes for deepin 25 emphasize DDE desktop improvements, UOS AI, the Solid immutable system, Linyaps application compatibility, Distrobox subsystem, and the Treeland window compositor preview.&lt;/p&gt;
&lt;p&gt;These directions show that Deepin/UOS is not just making a pretty Linux skin. It is trying to solve long-running pain points for Chinese desktop users:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;application installation and dependency conflicts;&lt;/li&gt;
&lt;li&gt;domestic software compatibility;&lt;/li&gt;
&lt;li&gt;desktop visual quality and ease of use;&lt;/li&gt;
&lt;li&gt;rollback when system updates fail;&lt;/li&gt;
&lt;li&gt;Chinese input, office work, and enterprise software ecosystem;&lt;/li&gt;
&lt;li&gt;Windows application compatibility and transition.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Deepin / UOS is suitable for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;users who care more about Chinese UI, input methods, office work, and localization;&lt;/li&gt;
&lt;li&gt;users who want an out-of-the-box and visually polished Linux desktop;&lt;/li&gt;
&lt;li&gt;people working in localized hardware and software environments;&lt;/li&gt;
&lt;li&gt;users who need enterprise office software, domestic software, domestic CPUs, or compatibility certification;&lt;/li&gt;
&lt;li&gt;users who do not want to configure GNOME/KDE from scratch.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Deepin&amp;rsquo;s strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;unified and polished DDE interface;&lt;/li&gt;
&lt;li&gt;better details for Chinese users;&lt;/li&gt;
&lt;li&gt;app store and system settings closer to ordinary user habits;&lt;/li&gt;
&lt;li&gt;Linyaps, Distrobox, and related approaches help reduce Linux application compatibility issues;&lt;/li&gt;
&lt;li&gt;the commercial UOS edition has practical value in localization and enterprise scenarios.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key caution is that Deepin community edition and UOS commercial edition do not have the same positioning. Deepin is better for personal experience and community users. UOS leans toward government and enterprise use, localization, commercial services, and certified environments. For production office environments, check hardware, software, and organizational requirements, not only the interface.&lt;/p&gt;
&lt;p&gt;My take: if you are a Chinese user and especially care about appearance, input methods, domestic software, and office experience, Deepin/UOS is attractive. But if you are a heavy developer relying on the most standard upstream Linux ecosystem, Ubuntu or Fedora may feel smoother.&lt;/p&gt;
&lt;h2 id=&#34;linux-mint-most-windows-like-and-most-comfortable&#34;&gt;Linux Mint: Most Windows-Like and Most Comfortable
&lt;/h2&gt;&lt;p&gt;Linux Mint&amp;rsquo;s position has always been stable: make Linux easy for ordinary users.&lt;/p&gt;
&lt;p&gt;As of 2026, the mainline Linux Mint series still revolves around 22.x and is based on Ubuntu 24.04 LTS. Linux Mint 22.3 &lt;code&gt;Zena&lt;/code&gt; was released in early 2026. It is not a showcase for the newest technology, but a stable, familiar, low-learning-cost desktop system.&lt;/p&gt;
&lt;p&gt;Linux Mint is especially suitable for Windows users moving to Linux, especially with the Cinnamon desktop:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;bottom-left menu;&lt;/li&gt;
&lt;li&gt;taskbar;&lt;/li&gt;
&lt;li&gt;system tray;&lt;/li&gt;
&lt;li&gt;minimize/maximize window logic;&lt;/li&gt;
&lt;li&gt;settings panel;&lt;/li&gt;
&lt;li&gt;file manager;&lt;/li&gt;
&lt;li&gt;update manager.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These details make it feel like a traditional Windows desktop. For users who do not want to adapt to the GNOME workflow, Linux Mint is easier to start with than Ubuntu.&lt;/p&gt;
&lt;p&gt;Linux Mint is suitable for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;users migrating from Windows to Linux;&lt;/li&gt;
&lt;li&gt;installing Linux for parents, family, or non-technical users;&lt;/li&gt;
&lt;li&gt;users who want a stable desktop without chasing new technologies;&lt;/li&gt;
&lt;li&gt;browser, office, video, file management, and light development use;&lt;/li&gt;
&lt;li&gt;people who dislike GNOME and do not want to tune KDE.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Its strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;intuitive Cinnamon desktop;&lt;/li&gt;
&lt;li&gt;friendly update manager;&lt;/li&gt;
&lt;li&gt;conservative and stable system;&lt;/li&gt;
&lt;li&gt;friendlier to older computers;&lt;/li&gt;
&lt;li&gt;large community knowledge base and relatively fewer surprises.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key note is that Linux Mint does not prioritize new technologies. Wayland, PipeWire, the newest GNOME/KDE, the latest kernels, and the latest Mesa usually do not land first there. Its goal is &amp;ldquo;work reliably today,&amp;rdquo; not &amp;ldquo;use the newest Linux desktop technology immediately.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;My take: if you want to turn a Windows laptop into Linux without explaining too many concepts, Linux Mint is one of the safest choices. It does not have Ubuntu&amp;rsquo;s commercial ecosystem or Fedora&amp;rsquo;s freshness, but the daily experience is very solid.&lt;/p&gt;
&lt;h2 id=&#34;fedora-developers-and-new-technologies-first&#34;&gt;Fedora: Developers and New Technologies First
&lt;/h2&gt;&lt;p&gt;Fedora is one of the front lines of desktop Linux technology.&lt;/p&gt;
&lt;p&gt;As of May 2026, the current mainline Fedora release is Fedora Linux 44. Fedora Workstation has long been one of the distributions where GNOME, Wayland, PipeWire, Mesa, the kernel, systemd, and other technologies land early.&lt;/p&gt;
&lt;p&gt;Fedora is suitable for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Linux developers;&lt;/li&gt;
&lt;li&gt;GNOME users;&lt;/li&gt;
&lt;li&gt;users who want new kernels, new Mesa, new compilers, and new toolchains earlier;&lt;/li&gt;
&lt;li&gt;users who want to experience modern Linux desktop stacks such as Wayland, PipeWire, and Flatpak;&lt;/li&gt;
&lt;li&gt;users who are not afraid of upgrading every six months.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Fedora&amp;rsquo;s strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;fast new-technology adoption;&lt;/li&gt;
&lt;li&gt;relatively clean default system;&lt;/li&gt;
&lt;li&gt;GNOME experience close to upstream;&lt;/li&gt;
&lt;li&gt;newer development toolchain;&lt;/li&gt;
&lt;li&gt;tight integration with Flatpak and the open-source desktop ecosystem;&lt;/li&gt;
&lt;li&gt;usually active support for modern hardware.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Its cautions are also clear:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;shorter lifecycle and regular upgrades are required;&lt;/li&gt;
&lt;li&gt;not suitable for people who do not want to maintain the system at all;&lt;/li&gt;
&lt;li&gt;NVIDIA, proprietary codecs, and some commercial software require extra repositories;&lt;/li&gt;
&lt;li&gt;if you want to &amp;ldquo;install it and leave it alone for five years,&amp;rdquo; Fedora is less suitable than LTS distributions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My take: Fedora is excellent for developers, Linux enthusiasts, and new-technology users. It is not the most effortless desktop for ordinary users, but it lets you see earlier what the future Linux desktop may look like.&lt;/p&gt;
&lt;h2 id=&#34;how-to-choose&#34;&gt;How to Choose
&lt;/h2&gt;&lt;h3 id=&#34;first-linux-install-for-beginners&#34;&gt;First Linux Install for Beginners
&lt;/h3&gt;&lt;p&gt;Choose Ubuntu 26.04 LTS or Linux Mint first.&lt;/p&gt;
&lt;p&gt;Ubuntu&amp;rsquo;s strengths are documentation and ecosystem. Linux Mint&amp;rsquo;s strengths are Windows-like behavior and low learning cost. If you are willing to adapt to GNOME, choose Ubuntu. If you want it to feel as Windows-like as possible, choose Linux Mint.&lt;/p&gt;
&lt;h3 id=&#34;chinese-office-and-localization-environments&#34;&gt;Chinese Office and Localization Environments
&lt;/h3&gt;&lt;p&gt;Look at Deepin / UOS first.&lt;/p&gt;
&lt;p&gt;If you need domestic office software, domestic browsers, government and enterprise systems, domestic CPUs, or organization-required compatibility environments, UOS has more practical value. Personal users who want a beautiful Chinese desktop can look at Deepin.&lt;/p&gt;
&lt;h3 id=&#34;developer-main-machine&#34;&gt;Developer Main Machine
&lt;/h3&gt;&lt;p&gt;Ubuntu 26.04 LTS and Fedora are both worth considering.&lt;/p&gt;
&lt;p&gt;If you value stability, tutorials, and commercial software support, choose Ubuntu. If you want new kernels, new GNOME, new toolchains, and open-source technology frontiers, choose Fedora.&lt;/p&gt;
&lt;h3 id=&#34;old-computers-or-home-computers&#34;&gt;Old Computers or Home Computers
&lt;/h3&gt;&lt;p&gt;Linux Mint is more suitable.&lt;/p&gt;
&lt;p&gt;Its traditional interface, relatively friendly resource use, and low maintenance pressure make it better for older computers, home browsing machines, and light office desktops than Fedora&amp;rsquo;s new-technology focus.&lt;/p&gt;
&lt;h3 id=&#34;aigpudevelopment-toolchains&#34;&gt;AI/GPU/Development Toolchains
&lt;/h3&gt;&lt;p&gt;Choose Ubuntu first.&lt;/p&gt;
&lt;p&gt;NVIDIA drivers, CUDA, PyTorch, TensorFlow, Docker, VS Code, JetBrains, and similar tools still most commonly use Ubuntu in official guides and tutorials. Fedora can also work, but solving problems usually requires more Linux experience.&lt;/p&gt;
&lt;h2 id=&#34;what-to-check-before-choosing&#34;&gt;What to Check Before Choosing
&lt;/h2&gt;&lt;p&gt;Do not judge desktop Linux only by screenshots. The real experience depends on these details:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;whether graphics drivers are stable, especially NVIDIA;&lt;/li&gt;
&lt;li&gt;whether Wi-Fi, Bluetooth, fingerprint, and camera work correctly;&lt;/li&gt;
&lt;li&gt;whether external monitors, scaling, and multi-monitor setup feel comfortable;&lt;/li&gt;
&lt;li&gt;whether Chinese input methods work well;&lt;/li&gt;
&lt;li&gt;whether common apps have official packages or Flatpak versions;&lt;/li&gt;
&lt;li&gt;whether system updates are easy to understand;&lt;/li&gt;
&lt;li&gt;whether solutions are easy to search for when problems occur;&lt;/li&gt;
&lt;li&gt;whether you can accept the default desktop workflow.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Many people fail to switch to Linux not because the kernel is weak, but because input methods, scaling, WeChat, online banking, printers, and graphics drivers feel wrong in daily use.&lt;/p&gt;
&lt;h2 id=&#34;my-recommendations&#34;&gt;My Recommendations
&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Scenario&lt;/th&gt;
          &lt;th&gt;Recommendation&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Beginner main desktop&lt;/td&gt;
          &lt;td&gt;Ubuntu 26.04 LTS&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Windows user migration&lt;/td&gt;
          &lt;td&gt;Linux Mint&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Beautiful Chinese desktop&lt;/td&gt;
          &lt;td&gt;Deepin&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Localization office / government and enterprise environment&lt;/td&gt;
          &lt;td&gt;UOS&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Stable developer environment&lt;/td&gt;
          &lt;td&gt;Ubuntu 26.04 LTS&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Linux new-technology experience&lt;/td&gt;
          &lt;td&gt;Fedora Linux 44&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Older computer for light office work&lt;/td&gt;
          &lt;td&gt;Linux Mint&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;AI/GPU development&lt;/td&gt;
          &lt;td&gt;Ubuntu 26.04 LTS&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;short-conclusion&#34;&gt;Short Conclusion
&lt;/h2&gt;&lt;p&gt;Ubuntu 26.04 LTS is the safest all-round desktop choice in 2026, suitable for beginners, developers, and main machines.&lt;/p&gt;
&lt;p&gt;Deepin/UOS is strong in Chinese experience, visual design, and localization compatibility, suitable for users who value local experience and government/enterprise environments.&lt;/p&gt;
&lt;p&gt;Linux Mint is extremely easy to use and stable, especially for smooth Windows-to-Linux migration.&lt;/p&gt;
&lt;p&gt;Fedora is strong in new technology and developer experience, suitable for users willing to follow the front edge of the Linux desktop.&lt;/p&gt;
&lt;p&gt;The quality of a desktop system ultimately depends on whether you still want to use it every day after turning on the computer. A distribution you can live with comfortably matters more than one that looks best on paper.&lt;/p&gt;
&lt;h2 id=&#34;related-links&#34;&gt;Related Links
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Ubuntu 26.04 LTS: &lt;a class=&#34;link&#34; href=&#34;https://releases.ubuntu.com/26.04/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://releases.ubuntu.com/26.04/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;deepin 25 Release Note: &lt;a class=&#34;link&#34; href=&#34;https://www.deepin.org/en/deepin-25-release/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.deepin.org/en/deepin-25-release/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;deepin 25.1.0 Release Note: &lt;a class=&#34;link&#34; href=&#34;https://www.deepin.org/en/deepin-25-1-release/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.deepin.org/en/deepin-25-1-release/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Linux Mint website: &lt;a class=&#34;link&#34; href=&#34;https://linuxmint.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://linuxmint.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Fedora Workstation: &lt;a class=&#34;link&#34; href=&#34;https://fedoraproject.org/workstation/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://fedoraproject.org/workstation/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Fedora Release Notes: &lt;a class=&#34;link&#34; href=&#34;https://docs.fedoraproject.org/en-US/fedora/latest/release-notes/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://docs.fedoraproject.org/en-US/fedora/latest/release-notes/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Choosing a Linux Server Distribution in 2026: Debian, Rocky Linux, AlmaLinux, and Ubuntu Server Compared</title>
        <link>https://knightli.com/en/2026/05/07/linux-server-distro-comparison-2026/</link>
        <pubDate>Thu, 07 May 2026 21:03:12 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/07/linux-server-distro-comparison-2026/</guid>
        <description>&lt;p&gt;When choosing a Linux server distribution in 2026, the key question is not &amp;ldquo;which one is best,&amp;rdquo; but &amp;ldquo;which one fits your operations model.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;If you need the most stable community distribution, Debian remains one of the best choices. If you need the RHEL-compatible ecosystem but do not want to buy RHEL directly, Rocky Linux and AlmaLinux are the most natural CentOS successors. If you care most about cloud images, documentation, fast deployment, and newer packages, Ubuntu Server is still the easiest path.&lt;/p&gt;
&lt;p&gt;Below is a practical comparison from a server perspective.&lt;/p&gt;
&lt;h2 id=&#34;quick-conclusion&#34;&gt;Quick Conclusion
&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Distribution&lt;/th&gt;
          &lt;th&gt;Best For&lt;/th&gt;
          &lt;th&gt;Main Strengths&lt;/th&gt;
          &lt;th&gt;Main Notes&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Debian&lt;/td&gt;
          &lt;td&gt;Long-term stability, self-hosting, basic services&lt;/td&gt;
          &lt;td&gt;Stable, clean, strong community, deep free-software tradition&lt;/td&gt;
          &lt;td&gt;Default packages are conservative; enterprise commercial support is less explicit than RHEL/Ubuntu&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Rocky Linux&lt;/td&gt;
          &lt;td&gt;RHEL-compatible production environments&lt;/td&gt;
          &lt;td&gt;Close to RHEL habits, suitable for enterprise CentOS migration&lt;/td&gt;
          &lt;td&gt;Conservative package cadence; desktop and new-tech experience are not the focus&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;AlmaLinux&lt;/td&gt;
          &lt;td&gt;RHEL-compatible production, cloud, enterprise replacement&lt;/td&gt;
          &lt;td&gt;RHEL compatible, active community, clear lifecycle&lt;/td&gt;
          &lt;td&gt;Still has some differences from RHEL; read release notes&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Ubuntu Server&lt;/td&gt;
          &lt;td&gt;Cloud servers, containers, development deployment&lt;/td&gt;
          &lt;td&gt;Strong cloud support, rich docs, fast deployment, long LTS lifecycle&lt;/td&gt;
          &lt;td&gt;Snap, HWE kernels, and PPAs need team-wide rules&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In one sentence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Safest general-purpose choice&lt;/strong&gt;: Debian.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enterprise RHEL ecosystem replacement&lt;/strong&gt;: Rocky Linux / AlmaLinux.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud and development efficiency first&lt;/strong&gt;: Ubuntu Server.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debian-rock-solid-stability&#34;&gt;Debian: Rock-Solid Stability
&lt;/h2&gt;&lt;p&gt;As of May 2026, the current Debian stable release is Debian 13 &lt;code&gt;trixie&lt;/code&gt;. Debian 12 &lt;code&gt;bookworm&lt;/code&gt; has moved into oldstable and still receives security and LTS support, but new server deployments should generally start with Debian 13.&lt;/p&gt;
&lt;p&gt;Debian&amp;rsquo;s characteristics have always been clear:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;conservative default package selection;&lt;/li&gt;
&lt;li&gt;clean system structure;&lt;/li&gt;
&lt;li&gt;no strong commercial-vendor binding;&lt;/li&gt;
&lt;li&gt;mature community governance;&lt;/li&gt;
&lt;li&gt;well suited to long-running basic services.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Debian is comfortable if your servers mainly run:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Nginx / Apache;&lt;/li&gt;
&lt;li&gt;PostgreSQL / MariaDB / Redis;&lt;/li&gt;
&lt;li&gt;Docker / Podman;&lt;/li&gt;
&lt;li&gt;WireGuard / Tailscale;&lt;/li&gt;
&lt;li&gt;file services, backup services, monitoring services;&lt;/li&gt;
&lt;li&gt;small self-hosted applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Debian&amp;rsquo;s advantage is not being &amp;ldquo;the newest,&amp;rdquo; but requiring less fuss. Many servers can run for years with normal security updates and minor maintenance.&lt;/p&gt;
&lt;p&gt;Debian is suitable when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;you want the system to stay simple and not be too affected by vendor strategy;&lt;/li&gt;
&lt;li&gt;you are familiar with &lt;code&gt;apt&lt;/code&gt;, systemd, and Debian file layout;&lt;/li&gt;
&lt;li&gt;you can accept software versions that are not the newest;&lt;/li&gt;
&lt;li&gt;you care more about stability, security updates, and predictable upgrades.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Debian is less suitable when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;a vendor only certifies RHEL or Ubuntu;&lt;/li&gt;
&lt;li&gt;you need enterprise commercial support with an SLA;&lt;/li&gt;
&lt;li&gt;you depend on the newest kernel, GPU stack, or new hardware support;&lt;/li&gt;
&lt;li&gt;your team has already built operations standards around the RHEL ecosystem.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;My take: for personal servers, self-hosting, lightweight SaaS, and small-team infrastructure, Debian remains an excellent first choice.&lt;/p&gt;
&lt;h2 id=&#34;rocky-linux-a-steady-centos-successor&#34;&gt;Rocky Linux: A Steady CentOS Successor
&lt;/h2&gt;&lt;p&gt;Rocky Linux has a clear position: it serves users who need the RHEL-compatible ecosystem and continues the role that CentOS Linux played in enterprise production environments.&lt;/p&gt;
&lt;p&gt;In 2026, both Rocky Linux 9 and Rocky Linux 10 are within their support periods. Rocky Linux 9 fits more conservative production environments, while Rocky Linux 10 is better for new projects, newer hardware, and a longer future runway.&lt;/p&gt;
&lt;p&gt;Rocky Linux fits scenarios such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;enterprise environments that previously ran CentOS 7 / CentOS 8;&lt;/li&gt;
&lt;li&gt;RHEL-style directory structure, package names, and operations habits;&lt;/li&gt;
&lt;li&gt;reliance on &lt;code&gt;dnf&lt;/code&gt;, RPM, SELinux, and firewalld;&lt;/li&gt;
&lt;li&gt;software vendors that explicitly support RHEL-compatible distributions;&lt;/li&gt;
&lt;li&gt;internal automation scripts written around Enterprise Linux.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Its advantage is low migration friction. Many teams have years of CentOS-based Ansible playbooks, monitoring rules, audit scripts, and security baselines. Moving to Rocky Linux is mentally much easier than moving to Debian or Ubuntu.&lt;/p&gt;
&lt;p&gt;Things to note about Rocky Linux:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;packages are conservative by design; this is a feature of Enterprise Linux, not a flaw;&lt;/li&gt;
&lt;li&gt;very new user-space components may require EPEL, third-party repositories, or containers;&lt;/li&gt;
&lt;li&gt;RHEL compatibility does not mean every commercial software vendor automatically offers formal support, so check certification lists;&lt;/li&gt;
&lt;li&gt;Rocky Linux 10 has new hardware baselines and ecosystem requirements, so validate before production.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My take: if your server environment is already CentOS / RHEL based, Rocky Linux is a very natural replacement, especially for stable production environments and internal enterprise services.&lt;/p&gt;
&lt;h2 id=&#34;almalinux-a-more-proactive-rhel-compatible-route&#34;&gt;AlmaLinux: A More Proactive RHEL-Compatible Route
&lt;/h2&gt;&lt;p&gt;AlmaLinux is another important CentOS successor. It is also enterprise-grade, long-term supported, and RHEL compatible.&lt;/p&gt;
&lt;p&gt;It shares many traits with Rocky Linux:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;both target the RHEL-compatible ecosystem;&lt;/li&gt;
&lt;li&gt;both fit server production environments;&lt;/li&gt;
&lt;li&gt;both have long-term 8, 9, and 10 release lines;&lt;/li&gt;
&lt;li&gt;both are suitable for CentOS migration;&lt;/li&gt;
&lt;li&gt;both can use a large set of Enterprise Linux ecosystem tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The difference is that AlmaLinux is more proactive in documenting and handling upstream differences while remaining RHEL compatible. For example, AlmaLinux 10 provides an &lt;code&gt;x86-64-v2&lt;/code&gt; architecture option for older hardware and clearly documents differences from RHEL in release notes.&lt;/p&gt;
&lt;p&gt;This is useful for some users: they want to stay in the RHEL ecosystem but also want a community distribution with more flexibility around hardware support, package builds, and EPEL compatibility.&lt;/p&gt;
&lt;p&gt;AlmaLinux is suitable when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;you need RHEL compatibility but do not want to be fully constrained by RHEL release strategy;&lt;/li&gt;
&lt;li&gt;you value community governance and transparent release notes;&lt;/li&gt;
&lt;li&gt;you need a stable base system for cloud platforms, container images, and enterprise workloads;&lt;/li&gt;
&lt;li&gt;you want a smooth migration from CentOS or older Enterprise Linux.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The key caution: AlmaLinux is not &amp;ldquo;identical to RHEL with your eyes closed.&amp;rdquo; For strict compliance, vendor certification, database certification, or hardware certification scenarios, check whether the software vendor explicitly supports AlmaLinux.&lt;/p&gt;
&lt;p&gt;My take: both Rocky Linux and AlmaLinux can replace CentOS. If you prefer a more conservative and traditional CentOS-style story, look at Rocky. If you value community transparency and a more flexible compatibility route, look at AlmaLinux.&lt;/p&gt;
&lt;h2 id=&#34;ubuntu-server-best-cloud-support-and-deployment-efficiency&#34;&gt;Ubuntu Server: Best Cloud Support and Deployment Efficiency
&lt;/h2&gt;&lt;p&gt;Ubuntu Server&amp;rsquo;s advantage is practical: cloud platforms, documentation, community tutorials, images, automation tools, and developer ecosystem are all strong.&lt;/p&gt;
&lt;p&gt;For new server deployments in 2026, the main choice is still Ubuntu 24.04 LTS. Ubuntu LTS usually has 5 years of standard support and can be extended through ESM. For cloud servers, container hosts, development environments, and CI/CD nodes, Ubuntu Server is often the fastest to get working.&lt;/p&gt;
&lt;p&gt;Ubuntu Server fits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AWS, Azure, Google Cloud, Oracle Cloud, Alibaba Cloud, Tencent Cloud, and other cloud servers;&lt;/li&gt;
&lt;li&gt;Docker, Kubernetes, GitLab Runner, CI/CD;&lt;/li&gt;
&lt;li&gt;AI / GPU / CUDA development environments;&lt;/li&gt;
&lt;li&gt;teams that need abundant tutorials and community recipes;&lt;/li&gt;
&lt;li&gt;environments where development and production should stay similar.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ubuntu&amp;rsquo;s strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;high-quality cloud images;&lt;/li&gt;
&lt;li&gt;lots of official and third-party documentation;&lt;/li&gt;
&lt;li&gt;often more active new hardware support;&lt;/li&gt;
&lt;li&gt;clear LTS cadence;&lt;/li&gt;
&lt;li&gt;convenient developer toolchain updates;&lt;/li&gt;
&lt;li&gt;many commercial software vendors provide Ubuntu installation instructions first.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Things to watch:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;not every team likes Snap on servers, so decide your policy in advance;&lt;/li&gt;
&lt;li&gt;PPAs are convenient, but overusing them in production increases maintenance risk;&lt;/li&gt;
&lt;li&gt;choose clearly between HWE kernel, cloud kernel, and standard kernel;&lt;/li&gt;
&lt;li&gt;for minimal-stability purists, Ubuntu&amp;rsquo;s default system feels busier than Debian.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My take: if you mainly run cloud servers, containers, development deployment, or AI toolchains, Ubuntu Server is usually the most efficient choice. It is not the most &amp;ldquo;pure&amp;rdquo; distribution, but it reduces lookup time and friction for many tasks.&lt;/p&gt;
&lt;h2 id=&#34;how-to-choose-among-the-four&#34;&gt;How to Choose Among the Four
&lt;/h2&gt;&lt;h3 id=&#34;personal-vps--self-hosting&#34;&gt;Personal VPS / Self-Hosting
&lt;/h3&gt;&lt;p&gt;Debian or Ubuntu Server first.&lt;/p&gt;
&lt;p&gt;If you want stability, low maintenance, and less fuss, choose Debian. If you often follow tutorials to deploy new projects or need a newer software stack, choose Ubuntu Server.&lt;/p&gt;
&lt;h3 id=&#34;enterprise-production&#34;&gt;Enterprise Production
&lt;/h3&gt;&lt;p&gt;Rocky Linux, AlmaLinux, or RHEL first.&lt;/p&gt;
&lt;p&gt;If the company used CentOS before, migration to Rocky / Alma is the cheapest path. If commercial databases, hardware certification, security compliance, or vendor support are involved, check certification lists first.&lt;/p&gt;
&lt;h3 id=&#34;cloud-native-and-container-hosts&#34;&gt;Cloud Native and Container Hosts
&lt;/h3&gt;&lt;p&gt;Ubuntu Server, Debian, and Rocky / Alma can all work.&lt;/p&gt;
&lt;p&gt;If the team values development efficiency, choose Ubuntu Server. If you want minimal stability, choose Debian. If the enterprise standard is RHEL-based, choose Rocky / Alma.&lt;/p&gt;
&lt;h3 id=&#34;ai--gpu-servers&#34;&gt;AI / GPU Servers
&lt;/h3&gt;&lt;p&gt;Look at Ubuntu Server first, then Rocky / Alma.&lt;/p&gt;
&lt;p&gt;The reason is simple: NVIDIA, CUDA, PyTorch, TensorFlow, driver installation tutorials, and community experience are usually richest on Ubuntu. Enterprise GPU clusters built around the RHEL ecosystem can choose Rocky / Alma, but drivers, CUDA, container runtime, and monitoring tools should be validated in advance.&lt;/p&gt;
&lt;h3 id=&#34;traditional-business-systems&#34;&gt;Traditional Business Systems
&lt;/h3&gt;&lt;p&gt;Rocky Linux / AlmaLinux first.&lt;/p&gt;
&lt;p&gt;Traditional Java, databases, middleware, commercial software, auditing, and operations standards often lean toward the RHEL ecosystem. In that case, Rocky / Alma fits existing systems more easily than Debian / Ubuntu.&lt;/p&gt;
&lt;h2 id=&#34;what-to-check-before-choosing&#34;&gt;What to Check Before Choosing
&lt;/h2&gt;&lt;p&gt;Do not choose only by distribution name. For server selection, judge by these questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Lifecycle&lt;/strong&gt;: until which year is this version maintained?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Upgrade path&lt;/strong&gt;: is major-version upgrade mature? Is smooth migration supported?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software sources&lt;/strong&gt;: do you rely on third-party repositories? Who maintains them?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security updates&lt;/strong&gt;: are security advisories, patch cadence, and CVE handling clear?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hardware support&lt;/strong&gt;: have CPU, NIC, RAID, GPU, and storage controllers been validated?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Team experience&lt;/strong&gt;: is the team more familiar with &lt;code&gt;apt&lt;/code&gt; or &lt;code&gt;dnf&lt;/code&gt;? Debian-style or RHEL-style systems?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vendor certification&lt;/strong&gt;: does the business software explicitly support this distribution?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automation assets&lt;/strong&gt;: can existing Ansible, Terraform, and image-building scripts be reused?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The real cost is often not the installation ISO. It is upgrades, audits, troubleshooting, and handover over the next five years.&lt;/p&gt;
&lt;h2 id=&#34;my-default-recommendations&#34;&gt;My Default Recommendations
&lt;/h2&gt;&lt;p&gt;If I had to give a default 2026 server selection guide:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Scenario&lt;/th&gt;
          &lt;th&gt;Recommendation&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Personal VPS, self-hosting&lt;/td&gt;
          &lt;td&gt;Debian 13&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Cloud server, fast deployment&lt;/td&gt;
          &lt;td&gt;Ubuntu Server 24.04 LTS&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;CentOS migration&lt;/td&gt;
          &lt;td&gt;Rocky Linux 9 / AlmaLinux 9&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;New enterprise project&lt;/td&gt;
          &lt;td&gt;Rocky Linux 10 / AlmaLinux 10, after ecosystem validation&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;AI / GPU development&lt;/td&gt;
          &lt;td&gt;Ubuntu Server 24.04 LTS&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Strict-compliance commercial production&lt;/td&gt;
          &lt;td&gt;RHEL, or Rocky / Alma after vendor support is confirmed&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;short-conclusion&#34;&gt;Short Conclusion
&lt;/h2&gt;&lt;p&gt;Debian&amp;rsquo;s keywords are stability, simplicity, community, and free-software tradition. It is suitable for long-running base servers.&lt;/p&gt;
&lt;p&gt;Rocky Linux and AlmaLinux are about RHEL compatibility, enterprise production, and CentOS replacement. They fit teams that already have Enterprise Linux operations systems.&lt;/p&gt;
&lt;p&gt;Ubuntu Server is about cloud, documentation, development efficiency, and ecosystem completeness. It fits fast deployment, containers, AI/GPU, and cloud servers.&lt;/p&gt;
&lt;p&gt;There is no forever-correct distribution. There is only the distribution that best matches your team, business, hardware, and lifecycle. The best server choice is usually not the hottest one, but the one you will still be willing to maintain five years later.&lt;/p&gt;
&lt;h2 id=&#34;related-links&#34;&gt;Related Links
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Debian Releases: &lt;a class=&#34;link&#34; href=&#34;https://www.debian.org/releases/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.debian.org/releases/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Ubuntu Releases: &lt;a class=&#34;link&#34; href=&#34;https://releases.ubuntu.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://releases.ubuntu.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Rocky Linux Release and Version Guide: &lt;a class=&#34;link&#34; href=&#34;https://wiki.rockylinux.org/rocky/version/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://wiki.rockylinux.org/rocky/version/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AlmaLinux Release Notes: &lt;a class=&#34;link&#34; href=&#34;https://wiki.almalinux.org/release-notes/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://wiki.almalinux.org/release-notes/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>How to Control fdupes Deletion Order: Keep Duplicate Files by Directory Priority</title>
        <link>https://knightli.com/en/2026/05/06/fdupes-delete-duplicates-by-directory-priority/</link>
        <pubDate>Wed, 06 May 2026 09:23:09 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/06/fdupes-delete-duplicates-by-directory-priority/</guid>
        <description>&lt;p&gt;When using &lt;code&gt;fdupes&lt;/code&gt; to delete duplicate files across three directories, such as &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, and &lt;code&gt;c&lt;/code&gt;, and you want to keep &lt;code&gt;a&lt;/code&gt; first, then &lt;code&gt;b&lt;/code&gt;, and delete duplicates from &lt;code&gt;c&lt;/code&gt; first, the key is not a complex rule. It is the order of directory arguments.&lt;/p&gt;
&lt;p&gt;In non-interactive delete mode, &lt;code&gt;fdupes&lt;/code&gt; keeps the first file it sees in each duplicate group and deletes later duplicates. Therefore, directory arguments should be arranged from highest retention priority to lowest.&lt;/p&gt;
&lt;p&gt;In other words, to achieve &amp;ldquo;delete from c first, then b, and keep a as much as possible&amp;rdquo;, write the command like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN a b c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The scan order is &lt;code&gt;a -&amp;gt; b -&amp;gt; c&lt;/code&gt;. When the same file exists in all three directories, the file in &lt;code&gt;a&lt;/code&gt; is found first and kept, while duplicates in &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt; are deleted. If only &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt; contain duplicates, &lt;code&gt;b&lt;/code&gt; is kept and &lt;code&gt;c&lt;/code&gt; is deleted.&lt;/p&gt;
&lt;h2 id=&#34;parameter-meaning&#34;&gt;Parameter Meaning
&lt;/h2&gt;&lt;p&gt;Common parameters are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-r&lt;/code&gt;: recursively scan subdirectories.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-d&lt;/code&gt;: delete duplicate files.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-N&lt;/code&gt;: when used with &lt;code&gt;-d&lt;/code&gt;, skip interactive confirmation, keep the first file in each duplicate group, and delete the rest.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, the basic format for automatic duplicate deletion is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN 目录A 目录B 目录C
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The earlier a directory appears, the higher its retention priority. The later it appears, the more likely its duplicate files are to be deleted.&lt;/p&gt;
&lt;h2 id=&#34;preview-before-deleting&#34;&gt;Preview Before Deleting
&lt;/h2&gt;&lt;p&gt;Using &lt;code&gt;-dN&lt;/code&gt; deletes files directly, so it is better to preview duplicate groups first:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -r a b c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The output is grouped by duplicate files. In each group, the file shown earlier is the one more likely to be kept in non-interactive deletion mode.&lt;/p&gt;
&lt;p&gt;You can also view summary information:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rm a b c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the data is important, save the result and inspect it manually:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -r a b c &amp;gt; duplicates.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After confirming that the order within each duplicate group matches your expectations, run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN a b c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;how-subdirectories-are-handled&#34;&gt;How Subdirectories Are Handled
&lt;/h2&gt;&lt;p&gt;As long as &lt;code&gt;-r&lt;/code&gt; is enabled, &lt;code&gt;fdupes&lt;/code&gt; recursively scans all files under the directories you pass in. Retention priority is still determined by the order in which paths appear in the command.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN dir_a dir_b dir_c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dir_a&lt;/code&gt; has the highest priority.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dir_b&lt;/code&gt; comes next.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dir_c&lt;/code&gt; has the lowest priority.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;dir_a/sub1/file.txt&lt;/code&gt; and &lt;code&gt;dir_c/sub1/file.txt&lt;/code&gt; have identical content, the file under &lt;code&gt;dir_a&lt;/code&gt; is kept. If &lt;code&gt;dir_a/x/y/file.txt&lt;/code&gt; and &lt;code&gt;dir_c/file.txt&lt;/code&gt; have identical content, the file under &lt;code&gt;dir_a&lt;/code&gt; is still kept first. &lt;code&gt;fdupes&lt;/code&gt; compares file content; filenames and directory depth do not need to match.&lt;/p&gt;
&lt;h2 id=&#34;precisely-controlling-subdirectory-priority&#34;&gt;Precisely Controlling Subdirectory Priority
&lt;/h2&gt;&lt;p&gt;If you only pass parent directories, the scan order inside subdirectories is determined by &lt;code&gt;fdupes&lt;/code&gt; traversal behavior. This is enough in most cases. But if you want a specific subdirectory to have higher priority, write it explicitly before its parent directory.&lt;/p&gt;
&lt;p&gt;For example, suppose you want to keep &lt;code&gt;dir_a&lt;/code&gt; first, then keep &lt;code&gt;dir_b/special&lt;/code&gt;, then process the rest of &lt;code&gt;dir_b&lt;/code&gt;, and finally process &lt;code&gt;dir_c&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN dir_a dir_b/special dir_b dir_c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This makes &lt;code&gt;dir_b/special&lt;/code&gt; scan before &lt;code&gt;dir_b&lt;/code&gt;. When &lt;code&gt;dir_b&lt;/code&gt; is scanned later, files under &lt;code&gt;special&lt;/code&gt; have already been recorded, so that subdirectory effectively has higher priority than the rest of &lt;code&gt;dir_b&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This pattern is useful when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a&lt;/code&gt; is the most important baseline directory.&lt;/li&gt;
&lt;li&gt;A subdirectory inside &lt;code&gt;b&lt;/code&gt; is more important than the rest of &lt;code&gt;b&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;c&lt;/code&gt; is mainly a low-priority backup directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The path order can be extended further:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN a b/important b c/keep-first c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The rule is still the same: the earlier it appears, the more likely it is to be kept.&lt;/p&gt;
&lt;h2 id=&#34;use-a-list-for-many-directories&#34;&gt;Use a List for Many Directories
&lt;/h2&gt;&lt;p&gt;If there are many directories and subdirectories, manually writing a long command is error-prone. You can write paths into a text file such as &lt;code&gt;folders.txt&lt;/code&gt;, ordered by priority:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/path/to/dir_a
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/path/to/dir_b/sub_important
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/path/to/dir_b
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/path/to/dir_c/sub_1
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/path/to/dir_c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then pass them to &lt;code&gt;fdupes&lt;/code&gt; with &lt;code&gt;xargs&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat folders.txt &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs fdupes -rdN
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If paths may contain spaces, use null-separated input for better safety:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tr &lt;span class=&#34;s1&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;\0&amp;#39;&lt;/span&gt; &amp;lt; folders.txt &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs -0 fdupes -rdN
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;important-boundaries&#34;&gt;Important Boundaries
&lt;/h2&gt;&lt;p&gt;First, &lt;code&gt;fdupes&lt;/code&gt; compares file content, not filenames. Two files with completely different names can still be treated as duplicates if their content is identical.&lt;/p&gt;
&lt;p&gt;Second, if directory &lt;code&gt;a&lt;/code&gt; contains duplicates internally, &lt;code&gt;fdupes -rdN a b c&lt;/code&gt; may also delete later duplicates inside &lt;code&gt;a&lt;/code&gt;. This command means &amp;ldquo;keep the first file according to the overall scan order&amp;rdquo;, not &amp;ldquo;never delete anything under a&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Third, by default, &lt;code&gt;fdupes&lt;/code&gt; does not follow symbolic links. If you need to handle files behind symlinks, confirm whether &lt;code&gt;-s&lt;/code&gt; is needed and whether that matches your data-safety expectations.&lt;/p&gt;
&lt;p&gt;Fourth, &lt;code&gt;fdupes&lt;/code&gt; only deletes duplicate files. It does not clean up empty directories. After deletion, if &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt; contain empty folders, you can run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;find b c -type d -empty -delete
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;safer-operating-habit&#34;&gt;Safer Operating Habit
&lt;/h2&gt;&lt;p&gt;If the directories contain important data, do not start with &lt;code&gt;-rdN&lt;/code&gt;. A safer workflow is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;fdupes -r a b c&lt;/code&gt; first to view duplicate groups.&lt;/li&gt;
&lt;li&gt;Confirm that the first file in each group is the one you want to keep.&lt;/li&gt;
&lt;li&gt;Then run &lt;code&gt;fdupes -rdN a b c&lt;/code&gt; for automatic deletion.&lt;/li&gt;
&lt;li&gt;After deletion, check whether empty directories need cleanup.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you are very worried about accidentally deleting files under &lt;code&gt;a&lt;/code&gt;, first clean a smaller range of low-priority directories, or export the results and filter them manually. The directory order in &lt;code&gt;fdupes&lt;/code&gt; is useful, but it is not an access-control rule. Once a path is included in the scan, duplicate files inside it may participate in deletion decisions.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;To delete duplicate files with &lt;code&gt;fdupes&lt;/code&gt; by priority, put the directories you want to keep earlier and the directories you want to delete from later.&lt;/p&gt;
&lt;p&gt;To keep &lt;code&gt;a&lt;/code&gt;, then &lt;code&gt;b&lt;/code&gt;, and delete from &lt;code&gt;c&lt;/code&gt; first:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN a b c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To give a subdirectory higher priority, write it before its parent directory:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdupes -rdN a b/important b c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The key sentence is simple: &lt;code&gt;fdupes -dN&lt;/code&gt; keeps duplicate files that appear first and deletes duplicates that appear later. Directory order is your retention priority.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>What Is the Difference Between Snap, Flatpak, and apt?</title>
        <link>https://knightli.com/en/2026/05/02/snap-flatpak-apt-differences/</link>
        <pubDate>Sat, 02 May 2026 11:22:26 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/02/snap-flatpak-apt-differences/</guid>
        <description>&lt;p&gt;When installing software on Ubuntu, you often see three names: &lt;code&gt;apt&lt;/code&gt;, Snap, and Flatpak. All of them can install apps, but they solve different problems.&lt;/p&gt;
&lt;p&gt;In short:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Tool&lt;/th&gt;
          &lt;th&gt;Main role&lt;/th&gt;
          &lt;th&gt;Best fit&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;apt&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Traditional Ubuntu/Debian package manager&lt;/td&gt;
          &lt;td&gt;System components, command-line tools, distro-maintained software&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Snap&lt;/td&gt;
          &lt;td&gt;App packaging format promoted by Canonical&lt;/td&gt;
          &lt;td&gt;Ubuntu desktop apps, server tools, auto-updated software&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Flatpak&lt;/td&gt;
          &lt;td&gt;Cross-distribution format focused on desktop apps&lt;/td&gt;
          &lt;td&gt;Graphical apps, sandboxed apps, Flathub ecosystem&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;apt-part-of-the-system&#34;&gt;apt: Part of the System
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;apt&lt;/code&gt; is the traditional package manager for Debian and Ubuntu systems. It installs &lt;code&gt;.deb&lt;/code&gt; packages from distribution repositories, with dependencies maintained by the distribution.&lt;/p&gt;
&lt;p&gt;Typical usage:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt install firefox
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;apt&lt;/code&gt; has these traits:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It integrates most deeply with the system.&lt;/li&gt;
&lt;li&gt;Dependencies are managed centrally by the distribution.&lt;/li&gt;
&lt;li&gt;Software versions usually follow the distribution release cycle.&lt;/li&gt;
&lt;li&gt;It is well suited for system libraries, drivers, command-line tools, and server components.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Its downside is also clear: versions may be older. Distributions prioritize stability, so they do not always ship the latest upstream release immediately.&lt;/p&gt;
&lt;h2 id=&#34;snap-app-and-dependencies-in-one-package&#34;&gt;Snap: App and Dependencies in One Package
&lt;/h2&gt;&lt;p&gt;Snap is a packaging format promoted by Canonical. It bundles an app with many of its runtime dependencies, reducing reliance on the exact system library versions.&lt;/p&gt;
&lt;p&gt;Installation looks similar:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo snap install firefox
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Snap&amp;rsquo;s advantages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The same package can more easily run across Ubuntu versions.&lt;/li&gt;
&lt;li&gt;Apps can update independently of system updates.&lt;/li&gt;
&lt;li&gt;There is some default isolation and permission control.&lt;/li&gt;
&lt;li&gt;It works well for desktop apps that need fast updates and some server tools.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Common complaints include slower startup, larger disk usage, less natural theme integration, and an update model that gives users less control than &lt;code&gt;apt&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;flatpak-more-desktop-app-oriented&#34;&gt;Flatpak: More Desktop-App Oriented
&lt;/h2&gt;&lt;p&gt;Flatpak is also a cross-distribution app packaging format, but it is more focused on Linux desktop apps. Many Flatpak apps come from Flathub.&lt;/p&gt;
&lt;p&gt;Typical installation:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;flatpak install flathub org.mozilla.firefox
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Flatpak has these traits:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Strong cross-distribution support.&lt;/li&gt;
&lt;li&gt;Focus on desktop app distribution.&lt;/li&gt;
&lt;li&gt;Uses runtimes to share base dependencies.&lt;/li&gt;
&lt;li&gt;Clearer sandbox and permission model.&lt;/li&gt;
&lt;li&gt;A large software selection on Flathub.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Flatpak also uses extra space, especially when installing a runtime for the first time. Once multiple apps share a runtime, the overhead becomes less wasteful.&lt;/p&gt;
&lt;h2 id=&#34;the-biggest-difference-dependencies&#34;&gt;The Biggest Difference: Dependencies
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;apt&lt;/code&gt; is more like assembling software into the system. Apps depend on libraries already in the system, and multiple packages share the same dependencies.&lt;/p&gt;
&lt;p&gt;Snap and Flatpak are more like shipping an app with its own runtime environment. The app carries part of what it needs, reducing problems caused by different system versions.&lt;/p&gt;
&lt;p&gt;That creates a tradeoff:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Approach&lt;/th&gt;
          &lt;th&gt;Pros&lt;/th&gt;
          &lt;th&gt;Cons&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;apt&lt;/code&gt; shares system dependencies&lt;/td&gt;
          &lt;td&gt;Saves space, integrates well, centrally maintained&lt;/td&gt;
          &lt;td&gt;Versions are tied to the distribution&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Snap/Flatpak carry runtime pieces&lt;/td&gt;
          &lt;td&gt;Cross-version, cross-distribution, easier updates&lt;/td&gt;
          &lt;td&gt;Larger packages, possible slower startup, weaker integration&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;isolation-and-permissions&#34;&gt;Isolation and Permissions
&lt;/h2&gt;&lt;p&gt;Software installed with &lt;code&gt;apt&lt;/code&gt; usually runs directly in the system environment. It integrates naturally, but has less isolation.&lt;/p&gt;
&lt;p&gt;Snap and Flatpak both use sandbox ideas. Apps cannot freely access all system resources by default; they need permission interfaces for files, camera, network, desktop notifications, and other resources.&lt;/p&gt;
&lt;p&gt;This does not make them absolutely safe, but it gives a clearer permission boundary. For desktop apps from mixed sources, that matters.&lt;/p&gt;
&lt;h2 id=&#34;updates-work-differently&#34;&gt;Updates Work Differently
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;apt&lt;/code&gt; usually follows system updates:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt upgrade
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Snap updates automatically. That is convenient, but also controversial: users do not have to manage versions, but they also get less control.&lt;/p&gt;
&lt;p&gt;Flatpak can be updated manually:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;flatpak update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;So if you care about when updates happen, &lt;code&gt;apt&lt;/code&gt; and Flatpak usually feel more controllable. If you want apps to stay current automatically, Snap is more hands-off.&lt;/p&gt;
&lt;h2 id=&#34;which-one-should-you-use&#34;&gt;Which One Should You Use
&lt;/h2&gt;&lt;p&gt;Choose by scenario:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;System tools, drivers, and server components: prefer &lt;code&gt;apt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Ubuntu-recommended desktop apps: Snap is fine.&lt;/li&gt;
&lt;li&gt;Newer desktop apps, especially cross-distribution apps: Flatpak is often a good choice.&lt;/li&gt;
&lt;li&gt;If the same app exists in all three formats: compare stability, startup speed, theme integration, and update needs.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A conservative approach is: use &lt;code&gt;apt&lt;/code&gt; for the system layer, then choose Snap or Flatpak for desktop apps as needed.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;apt&lt;/code&gt;, Snap, and Flatpak do not fully replace one another. They are different distribution models.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;apt&lt;/code&gt; is better for maintaining the system. Snap emphasizes bundled dependencies and automatic updates. Flatpak is better for cross-distribution desktop apps and sandboxed delivery.&lt;/p&gt;
&lt;p&gt;For everyday use, there is no need to obsess over which is best. Use &lt;code&gt;apt&lt;/code&gt; for system software. For desktop apps, follow your distribution&amp;rsquo;s recommendation and your own experience: stable operation, controlled updates, and clear permissions are what matter.&lt;/p&gt;
&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.reddit.com/r/Ubuntu/comments/9awvip/eli5_snap_and_flatpak_how_are_they_differ_from_apt/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.reddit.com/r/Ubuntu/comments/9awvip/eli5_snap_and_flatpak_how_are_they_differ_from_apt/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Linux 7.0 and 7.1 NTFS Driver Changes Explained</title>
        <link>https://knightli.com/en/2026/05/02/linux-7-0-7-1-ntfs-driver/</link>
        <pubDate>Sat, 02 May 2026 10:46:20 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/02/linux-7-0-7-1-ntfs-driver/</guid>
        <description>&lt;p&gt;After Linux 7.0, Linux 7.1 entered the next feature merge window. One notable change is a new NTFS kernel driver.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;New&amp;rdquo; does not mean Linux is supporting NTFS for the first time, nor does it mean &lt;code&gt;ntfs3&lt;/code&gt; is being replaced. More precisely, Linux 7.1 adds a new optional in-kernel NTFS read-write driver. It is based on the old in-kernel &lt;code&gt;ntfs&lt;/code&gt; driver, modernized and extended with more complete write support.&lt;/p&gt;
&lt;h2 id=&#34;quick-take&#34;&gt;Quick Take
&lt;/h2&gt;&lt;p&gt;Linux now has three main NTFS paths:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Option&lt;/th&gt;
          &lt;th&gt;Location&lt;/th&gt;
          &lt;th&gt;Read-write support&lt;/th&gt;
          &lt;th&gt;Best fit&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;ntfs-3g&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;User-space FUSE&lt;/td&gt;
          &lt;td&gt;Read-write&lt;/td&gt;
          &lt;td&gt;Stability first; long-time distro default&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;ntfs3&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Kernel-space&lt;/td&gt;
          &lt;td&gt;Read-write&lt;/td&gt;
          &lt;td&gt;More direct kernel integration and performance&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;New &lt;code&gt;ntfs&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Kernel-space&lt;/td&gt;
          &lt;td&gt;Read-write&lt;/td&gt;
          &lt;td&gt;Optional implementation added in Linux 7.1&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This is not a forced migration. It simply adds another option. Most users can keep following their distribution defaults for now.&lt;/p&gt;
&lt;h2 id=&#34;how-70-and-71-relate&#34;&gt;How 7.0 and 7.1 Relate
&lt;/h2&gt;&lt;p&gt;Linux 7.0 only marks the move into the 7.x kernel series. It does not mean NTFS support was suddenly rewritten in 7.0. The NTFS-related change appears in the Linux 7.1 feature cycle.&lt;/p&gt;
&lt;p&gt;NTFS remains important for Linux desktop users because dual-boot systems, external drives, USB drives, and Windows data disks often use it. The hard part is writes: if a file-system driver has a bug, user data can be affected directly. That is why NTFS driver changes are treated carefully.&lt;/p&gt;
&lt;h2 id=&#34;ntfs-3g-ntfs3-and-the-new-ntfs&#34;&gt;&lt;code&gt;ntfs-3g&lt;/code&gt;, &lt;code&gt;ntfs3&lt;/code&gt;, and the New &lt;code&gt;ntfs&lt;/code&gt;
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;ntfs-3g&lt;/code&gt; is a user-space FUSE driver. It has long handled NTFS read-write support on Linux. It may not always be the fastest option, but it is mature, compatible, and well documented.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ntfs3&lt;/code&gt; is the in-kernel NTFS driver contributed by Paragon Software and already merged into Linux. It has a shorter path, integrates more directly with VFS, and can offer better performance. But file-system drivers require strong maintenance discipline, and &lt;code&gt;ntfs3&lt;/code&gt; has seen discussion around maintenance pace and code quality after merging.&lt;/p&gt;
&lt;p&gt;The new Linux 7.1 &lt;code&gt;ntfs&lt;/code&gt; driver is maintained by Namjae Jeon. It is not written from scratch; it modernizes the old kernel &lt;code&gt;ntfs&lt;/code&gt; driver, adds write support, and coexists with &lt;code&gt;ntfs3&lt;/code&gt; as another optional implementation.&lt;/p&gt;
&lt;p&gt;In short:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;ntfs-3g&lt;/code&gt;: conservative, mature, user-space.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ntfs3&lt;/code&gt;: existing in-kernel mainline option.&lt;/li&gt;
&lt;li&gt;New &lt;code&gt;ntfs&lt;/code&gt;: new in-kernel option in 7.1, still worth watching.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;which-one-to-use&#34;&gt;Which One to Use
&lt;/h2&gt;&lt;p&gt;There is no need to switch immediately. A conservative order is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Keep using the distribution default for important data, usually &lt;code&gt;ntfs-3g&lt;/code&gt; or a tested &lt;code&gt;ntfs3&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Try &lt;code&gt;ntfs3&lt;/code&gt; when performance matters.&lt;/li&gt;
&lt;li&gt;Test the new &lt;code&gt;ntfs&lt;/code&gt; driver on temporary, test, or recoverable data first.&lt;/li&gt;
&lt;li&gt;Back up important NTFS partitions before writing.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To mount with &lt;code&gt;ntfs3&lt;/code&gt; manually:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mount -t ntfs3 /dev/sdX1 /mnt/ntfs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For temporary read-only access:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mount -o ro /dev/sdX1 /mnt/ntfs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To check which driver is being used:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;findmnt -T /mnt/ntfs
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mount &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep ntfs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;dual-boot-notes&#34;&gt;Dual-Boot Notes
&lt;/h2&gt;&lt;p&gt;If an NTFS partition comes from a Windows system disk, make sure Windows is fully shut down before writing to it. Fast Startup and hibernation can leave the NTFS volume in an unfinished state, and Linux writes may then cause consistency problems.&lt;/p&gt;
&lt;p&gt;Check these first:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Disable Windows Fast Startup.&lt;/li&gt;
&lt;li&gt;Make sure the partition is not hibernated.&lt;/li&gt;
&lt;li&gt;Confirm BitLocker or other encryption is not blocking access.&lt;/li&gt;
&lt;li&gt;Safely eject external drives from Windows.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These rules apply whether you use &lt;code&gt;ntfs-3g&lt;/code&gt;, &lt;code&gt;ntfs3&lt;/code&gt;, or the new &lt;code&gt;ntfs&lt;/code&gt; driver.&lt;/p&gt;
&lt;h2 id=&#34;why-multiple-ntfs-drivers-exist&#34;&gt;Why Multiple NTFS Drivers Exist
&lt;/h2&gt;&lt;p&gt;Multiple implementations for the same file system are not unusual in Linux. Old, new, vendor, and community implementations can coexist until maintenance status and real-world feedback make the preferred path clear.&lt;/p&gt;
&lt;p&gt;NTFS is especially suited to a conservative approach:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;User data risk is high.&lt;/li&gt;
&lt;li&gt;Compatibility cases are complex.&lt;/li&gt;
&lt;li&gt;Implementations differ in performance and stability tradeoffs.&lt;/li&gt;
&lt;li&gt;Distributions need time to validate defaults.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So the new Linux 7.1 &lt;code&gt;ntfs&lt;/code&gt; driver does not immediately obsolete &lt;code&gt;ntfs-3g&lt;/code&gt; or &lt;code&gt;ntfs3&lt;/code&gt;. It gives the kernel community another maintainable option.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;The new Linux 7.1 &lt;code&gt;ntfs&lt;/code&gt; driver is an optional in-kernel NTFS read-write implementation. It coexists with &lt;code&gt;ntfs-3g&lt;/code&gt; and &lt;code&gt;ntfs3&lt;/code&gt;; it does not directly replace either.&lt;/p&gt;
&lt;p&gt;Regular users can keep using distribution defaults. Users who want to test performance or kernel file-system changes can watch &lt;code&gt;ntfs3&lt;/code&gt; and the new &lt;code&gt;ntfs&lt;/code&gt;, but important data should be backed up before switching drivers.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>sudo vs sudo-rs: What the Rust Version of sudo Changes</title>
        <link>https://knightli.com/en/2026/05/01/sudo-vs-sudo-rs-rust-linux-command/</link>
        <pubDate>Fri, 01 May 2026 19:27:08 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/01/sudo-vs-sudo-rs-rust-linux-command/</guid>
        <description>&lt;p&gt;&lt;code&gt;sudo&lt;/code&gt; is one of the most familiar commands for Linux users.
It allows a normal user to temporarily run commands with higher privileges within an authorized scope, such as installing software, changing system configuration, or restarting services.&lt;/p&gt;
&lt;p&gt;Recently, &lt;code&gt;sudo-rs&lt;/code&gt; has attracted more attention because Ubuntu 25.10 starts using the Rust implementation &lt;code&gt;sudo-rs&lt;/code&gt; by default to replace classic sudo.
For ordinary users, the command on the surface is still &lt;code&gt;sudo&lt;/code&gt;.
The real change is underneath: the implementation being executed may already be the Rust version of sudo.&lt;/p&gt;
&lt;p&gt;This raises two natural questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is something wrong with classic sudo?&lt;/li&gt;
&lt;li&gt;Will sudo-rs affect daily use and server configuration?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The short answer is: ordinary desktop users basically do not need to worry; if you maintain servers, have written complex sudoers rules, or rely on special sudo behavior, you should test carefully.&lt;/p&gt;
&lt;h2 id=&#34;what-is-sudo-rs&#34;&gt;What Is sudo-rs?
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;sudo-rs&lt;/code&gt; is an implementation of sudo / su written in Rust.
Its goal is not to create a completely different new command, but to reimplement the main features of classic sudo while using Rust&amp;rsquo;s memory-safety properties to reduce common security risks.&lt;/p&gt;
&lt;p&gt;Classic sudo is mainly written in C. It has a long history and a very complete feature set.
That maturity brings stability, but it also brings maintenance burden.
Much of the code comes from very early Unix/Linux use cases, with many compatibility paths, extensions, and edge-case handlers added over time.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo-rs&lt;/code&gt; chooses to reimplement it for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;reduce memory-safety issues with Rust;&lt;/li&gt;
&lt;li&gt;use a more modern code structure to lower maintenance difficulty;&lt;/li&gt;
&lt;li&gt;remove some historical features and risky default behaviors;&lt;/li&gt;
&lt;li&gt;attract new contributors familiar with Rust;&lt;/li&gt;
&lt;li&gt;provide a more auditable foundation for future privilege-elevation tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, &lt;code&gt;sudo-rs&lt;/code&gt; is not a 100% compatible replacement for classic sudo.
It is still under development. Some traditional features have not been implemented yet, and others may never be implemented.&lt;/p&gt;
&lt;h2 id=&#34;what-ordinary-users-will-notice&#34;&gt;What Ordinary Users Will Notice
&lt;/h2&gt;&lt;p&gt;For ordinary users, very little changes.&lt;/p&gt;
&lt;p&gt;You still use it like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Or:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl restart nginx
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In Ubuntu 25.10, &lt;code&gt;sudo&lt;/code&gt; points to &lt;code&gt;sudo-rs&lt;/code&gt;.
Users do not need to change commands to &lt;code&gt;sudo-rs&lt;/code&gt;, and common &lt;code&gt;sudo&lt;/code&gt; calls in scripts will not immediately fail because of a command-name change.&lt;/p&gt;
&lt;p&gt;The most visible change is password input feedback.
&lt;code&gt;sudo-rs&lt;/code&gt; shows asterisks by default when you type the password.
Classic sudo can also be configured to behave this way, but many distributions default to showing no characters.&lt;/p&gt;
&lt;p&gt;Some error and warning messages may also use different wording.
For example, password failures, permission problems, and incompatible configuration may show prompts that are not exactly the same as before.
This has little impact on human users, but scripts that parse sudo&amp;rsquo;s error output should be checked.&lt;/p&gt;
&lt;h2 id=&#34;what-administrators-should-watch&#34;&gt;What Administrators Should Watch
&lt;/h2&gt;&lt;p&gt;System administrators and advanced users are the ones who need to pay attention.&lt;/p&gt;
&lt;p&gt;The classic sudo ecosystem is large, and many servers have complex sudoers configurations.
These configurations may include command-argument matching, environment-variable control, logging, email notifications, PAM behavior, and host-group policies.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo-rs&lt;/code&gt; currently has some differences from classic sudo.
For example, the original article notes that &lt;code&gt;sudo-rs&lt;/code&gt; does not include classic sudo&amp;rsquo;s sendmail support.
Some environments used sendmail to send notifications about sudo usage, and those setups will need another approach when migrating.&lt;/p&gt;
&lt;p&gt;For authentication, &lt;code&gt;sudo-rs&lt;/code&gt; uses PAM.
This means behaviors such as resource limits and umask should be configured more through PAM, rather than relying entirely on the sudoers file.
If you previously handled many details in sudoers, verify that those rules still work before switching.&lt;/p&gt;
&lt;p&gt;Another important change is wildcard support in command argument positions.
&lt;code&gt;sudo-rs&lt;/code&gt; does not support wildcards in command argument positions, in order to avoid common sudoers configuration mistakes.
This is good for security, but it may affect existing rules.&lt;/p&gt;
&lt;h2 id=&#34;how-ubuntu-handles-sudo-and-sudo-rs&#34;&gt;How Ubuntu Handles sudo and sudo-rs
&lt;/h2&gt;&lt;p&gt;Starting with Ubuntu 25.10, the system uses &lt;code&gt;sudo-rs&lt;/code&gt; by default.
Users continue typing &lt;code&gt;sudo&lt;/code&gt;, while the Rust implementation runs underneath.&lt;/p&gt;
&lt;p&gt;Classic sudo has not disappeared immediately.
During Ubuntu&amp;rsquo;s transition, classic sudo is still kept as &lt;code&gt;sudo-ws&lt;/code&gt;.
If you truly need the traditional implementation, you can use &lt;code&gt;sudo-ws&lt;/code&gt;, or switch the default sudo through the alternatives system.&lt;/p&gt;
&lt;p&gt;The switching command looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo update-alternatives --config sudo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That said, ordinary users should not actively switch back to classic sudo.
If you have not customized sudoers and do not rely on special behavior, following the distribution default is simpler.&lt;/p&gt;
&lt;p&gt;If you want to test on older Ubuntu versions, &lt;code&gt;sudo-rs&lt;/code&gt; has been available from the universe repository since Ubuntu 24.04.
Other distributions may also provide packages, but command names and integration methods may differ.&lt;/p&gt;
&lt;h2 id=&#34;why-sudo-rs-uses-rust&#34;&gt;Why sudo-rs Uses Rust
&lt;/h2&gt;&lt;p&gt;sudo is a high-privilege tool.
If this kind of tool has a vulnerability, the consequences can be much more serious than with ordinary commands.
Historically, sudo has had several privilege-escalation vulnerabilities.&lt;/p&gt;
&lt;p&gt;Rust&amp;rsquo;s advantage is memory safety.
Through ownership, borrow checking, and the type system, it reduces common problems such as dangling pointers, out-of-bounds access, and use-after-free.
This does not guarantee that the program is absolutely safe, but it can reduce a class of vulnerabilities common in C/C++ projects.&lt;/p&gt;
&lt;p&gt;For a tool like sudo, which sits in a security-sensitive position for a long time, rewriting it in a safer language has practical meaning.
It is not just &amp;ldquo;Rust for Rust&amp;rsquo;s sake&amp;rdquo;; it is an attempt to reduce maintenance and audit cost.&lt;/p&gt;
&lt;p&gt;Of course, language cannot solve every security problem.
Permission-check logic, configuration parsing, PAM interaction, environment-variable handling, logging, and user experience still require careful design and long-term testing.&lt;/p&gt;
&lt;h2 id=&#34;sudo-rs-is-not-the-only-alternative&#34;&gt;sudo-rs Is Not the Only Alternative
&lt;/h2&gt;&lt;p&gt;There have always been other alternatives in the sudo ecosystem.&lt;/p&gt;
&lt;p&gt;One common example is &lt;code&gt;doas&lt;/code&gt;.
It comes from OpenBSD and is designed to be simpler, with a smaller configuration surface.
Some users prefer it because it is not as complex as sudo.&lt;/p&gt;
&lt;p&gt;There are also some Rust or systemd-related alternatives, such as RootAsRole and systemd&amp;rsquo;s &lt;code&gt;run0&lt;/code&gt;.
However, these tools do not have exactly the same goals or target scenarios.&lt;/p&gt;
&lt;p&gt;For most Linux distributions, sudo is still the default choice.
The significance of &lt;code&gt;sudo-rs&lt;/code&gt; is that it tries to keep user habits unchanged while replacing the underlying implementation with a more modern codebase.&lt;/p&gt;
&lt;h2 id=&#34;what-to-check-before-migrating&#34;&gt;What to Check Before Migrating
&lt;/h2&gt;&lt;p&gt;If you are just a personal desktop user, follow the distribution default.&lt;/p&gt;
&lt;p&gt;If you maintain servers or workstations, check the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Whether there are complex &lt;code&gt;/etc/sudoers&lt;/code&gt; or &lt;code&gt;/etc/sudoers.d/&lt;/code&gt; rules.&lt;/li&gt;
&lt;li&gt;Whether command-argument wildcards are used.&lt;/li&gt;
&lt;li&gt;Whether sudo email notifications are relied on.&lt;/li&gt;
&lt;li&gt;Whether scripts parse sudo&amp;rsquo;s error output.&lt;/li&gt;
&lt;li&gt;Whether sudoers controls umask, resource limits, or environment variables.&lt;/li&gt;
&lt;li&gt;Whether LDAP, PAM, SSSD, or other authentication integrations are used.&lt;/li&gt;
&lt;li&gt;Whether automation/deployment scripts assume classic sudo behavior.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can first verify on a test machine:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo -l
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then run key maintenance commands and confirm that permissions, environment variables, and logging behavior match expectations.&lt;/p&gt;
&lt;h2 id=&#34;should-you-switch-to-sudo-rs-manually&#34;&gt;Should You Switch to sudo-rs Manually?
&lt;/h2&gt;&lt;p&gt;If your distribution has already switched by default, ordinary users can accept it directly.
If you are using a server or production environment, do not manually replace sudo just for experimentation.&lt;/p&gt;
&lt;p&gt;A safer process is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;install &lt;code&gt;sudo-rs&lt;/code&gt; in a test environment;&lt;/li&gt;
&lt;li&gt;verify existing sudoers configuration item by item;&lt;/li&gt;
&lt;li&gt;check PAM, logging, auditing, and automation scripts;&lt;/li&gt;
&lt;li&gt;confirm the rollback path;&lt;/li&gt;
&lt;li&gt;migrate after the distribution provides stable integration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This kind of tool sits on the privilege chain, so it is not enough to judge it by whether a few commands can run.
The real test is boundary conditions and failure cases.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;sudo-rs&lt;/code&gt; is a Rust implementation of classic sudo, aiming to support sudo&amp;rsquo;s core features with a more modern and safer codebase.
Ubuntu 25.10 enabling it by default shows that major distributions are starting to push this direction seriously.&lt;/p&gt;
&lt;p&gt;For ordinary users, the change is small.
You still type &lt;code&gt;sudo&lt;/code&gt;; only the underlying implementation may have become &lt;code&gt;sudo-rs&lt;/code&gt;.
At most, you may notice password asterisks or slightly different error messages.&lt;/p&gt;
&lt;p&gt;For system administrators, compatibility is the key issue.
If the system has complex sudoers rules, sendmail notifications, PAM integration, argument wildcards, or scripts that depend on sudo output, test before upgrading.&lt;/p&gt;
&lt;p&gt;Rewriting in Rust is not a magic cure, but for a security-sensitive tool like sudo, reducing memory-safety risk and maintenance complexity is a direction worth taking seriously.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://itsfoss.com/sudo-vs-sudo-rs/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;It&amp;rsquo;s FOSS: sudo vs sudo-rs: What You Need to Know&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/trifectatechfoundation/sudo-rs&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;sudo-rs GitHub project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>X11 vs Wayland: Differences, Pros, Cons, and When to Choose Each</title>
        <link>https://knightli.com/en/2026/05/01/x11-vs-wayland-differences-pros-cons/</link>
        <pubDate>Fri, 01 May 2026 19:23:01 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/01/x11-vs-wayland-differences-pros-cons/</guid>
        <description>&lt;p&gt;On the Linux desktop, you often encounter two names: &lt;code&gt;X11&lt;/code&gt; and &lt;code&gt;Wayland&lt;/code&gt;.
Both are related to graphical display, but they come from different eras and follow very different architectural ideas and user-experience tradeoffs.&lt;/p&gt;
&lt;p&gt;In simple terms, X11 is the older display protocol and ecosystem. It is feature-complete and highly compatible, but its architecture is complex and its security model is outdated.
Wayland is the newer display protocol. Its goal is to reduce intermediate layers, improve security, and make the desktop feel smoother, but some software and workflows still need adaptation.&lt;/p&gt;
&lt;p&gt;For everyday use, the short version is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;on a new Linux desktop installation, try Wayland first;&lt;/li&gt;
&lt;li&gt;if you need old software, complex remote desktop workflows, special input devices, or certain professional tools, X11 may still be more reliable;&lt;/li&gt;
&lt;li&gt;for gaming and ordinary office use, Wayland is increasingly usable;&lt;/li&gt;
&lt;li&gt;if you hit compatibility problems, you can switch back to X11. This does not need to become a belief system.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;what-is-x11&#34;&gt;What Is X11?
&lt;/h2&gt;&lt;p&gt;X11, also called the X Window System or Xorg, is the graphical system used by Linux and Unix desktops for many years.
Its design came from an early network-computing world: a program could run on one machine while its window was displayed on another.&lt;/p&gt;
&lt;p&gt;A typical X11 structure looks like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;applications draw window content;&lt;/li&gt;
&lt;li&gt;the X Server manages display, input, and basic window operations;&lt;/li&gt;
&lt;li&gt;the window manager handles borders, movement, and stacking;&lt;/li&gt;
&lt;li&gt;the compositor handles shadows, transparency, animation, tear control, and similar effects.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This architecture is flexible and gave X11 a large ecosystem of tools and extensions.
But over time, its problems became clear: many components, long rendering paths, loose permission boundaries, and many modern desktop requirements maintained through extensions and patches.&lt;/p&gt;
&lt;h2 id=&#34;what-is-wayland&#34;&gt;What Is Wayland?
&lt;/h2&gt;&lt;p&gt;Wayland is not a complete traditional display server in the same sense. It is a more modern display protocol.
Under Wayland, the compositor usually also acts as the display server.
GNOME&amp;rsquo;s Mutter, KDE&amp;rsquo;s KWin, and wlroots-based compositors can all serve as Wayland compositors.&lt;/p&gt;
&lt;p&gt;A typical Wayland structure is shorter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;applications render their own window content;&lt;/li&gt;
&lt;li&gt;the compositor receives buffers submitted by applications;&lt;/li&gt;
&lt;li&gt;the compositor centrally manages windows, input, display outputs, and composition;&lt;/li&gt;
&lt;li&gt;the final frame is handed directly to the kernel graphics stack for display.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This design reduces the detours between the X Server, window manager, and compositor in traditional X11.
It also makes permission control clearer: applications cannot freely read other window contents by default, nor can they casually listen to global keyboard input.&lt;/p&gt;
&lt;h2 id=&#34;architectural-differences&#34;&gt;Architectural Differences
&lt;/h2&gt;&lt;p&gt;The core difference is responsibility.&lt;/p&gt;
&lt;p&gt;In X11, the X Server sits at the center, and many applications can interact with it.
Window managers, compositors, input methods, screenshot tools, and remote-control tools can all get a lot of information through X11&amp;rsquo;s open interfaces.
This brings strong compatibility, but also security issues.&lt;/p&gt;
&lt;p&gt;In Wayland, the compositor is the center.
Applications cannot directly access other windows&amp;rsquo; content, nor can they listen to all keyboard input by default.
Capabilities such as screenshots, recording, screen sharing, global shortcuts, and remote control need to go through desktop portals, PipeWire, or controlled interfaces provided by the compositor.&lt;/p&gt;
&lt;p&gt;You can think of it this way:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Item&lt;/th&gt;
          &lt;th&gt;X11&lt;/th&gt;
          &lt;th&gt;Wayland&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Design era&lt;/td&gt;
          &lt;td&gt;Older&lt;/td&gt;
          &lt;td&gt;Newer&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Central component&lt;/td&gt;
          &lt;td&gt;X Server&lt;/td&gt;
          &lt;td&gt;Compositor&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Compositor role&lt;/td&gt;
          &lt;td&gt;Optional or additional component&lt;/td&gt;
          &lt;td&gt;Core component&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Application isolation&lt;/td&gt;
          &lt;td&gt;Weaker&lt;/td&gt;
          &lt;td&gt;Stronger&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Remote display&lt;/td&gt;
          &lt;td&gt;Stronger native concept&lt;/td&gt;
          &lt;td&gt;Depends on newer toolchains&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Compatibility&lt;/td&gt;
          &lt;td&gt;Very strong&lt;/td&gt;
          &lt;td&gt;Still being completed&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Modern desktop experience&lt;/td&gt;
          &lt;td&gt;Depends on extensions and patches&lt;/td&gt;
          &lt;td&gt;Designed closer to modern needs&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;strengths-of-x11&#34;&gt;Strengths of X11
&lt;/h2&gt;&lt;p&gt;X11&amp;rsquo;s biggest strength is maturity.
It has been running for many years, and almost all Linux graphical applications work under X11.
Older tools, professional software, special input methods, remote-control solutions, and automation scripts often support X11 first.&lt;/p&gt;
&lt;p&gt;Another strength of X11 is operability.
Many tools can directly read windows, simulate input, capture the screen, move windows, and listen to key presses.
This is convenient for automation, remote assistance, window-management scripts, and special workflows.&lt;/p&gt;
&lt;p&gt;If your needs include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;using old GUI software;&lt;/li&gt;
&lt;li&gt;relying on &lt;code&gt;xrandr&lt;/code&gt;, &lt;code&gt;xinput&lt;/code&gt;, &lt;code&gt;xdotool&lt;/code&gt;, or &lt;code&gt;wmctrl&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;using traditional remote desktop or window forwarding;&lt;/li&gt;
&lt;li&gt;needing special screenshot, recording, or keyboard/mouse macro tools;&lt;/li&gt;
&lt;li&gt;running an application that is still unstable under Wayland;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;then X11 remains a very practical choice.&lt;/p&gt;
&lt;h2 id=&#34;weaknesses-of-x11&#34;&gt;Weaknesses of X11
&lt;/h2&gt;&lt;p&gt;X11&amp;rsquo;s weaknesses mainly come from historical baggage.&lt;/p&gt;
&lt;p&gt;First is the old security model.
In a traditional X11 session, a normal application can often listen to other windows&amp;rsquo; input, capture screen contents, and simulate keyboard and mouse operations.
From a modern desktop-security perspective, this is hard to accept.&lt;/p&gt;
&lt;p&gt;Second is the complex rendering path.
X11 went through many extensions: Composite, GLX, DRI, RandR, Present, and more.
These extensions allowed it to keep supporting modern desktops, but also made the graphics stack complex.
In high-refresh-rate, multi-monitor, mixed-scaling, mixed-DPI, and low-latency input scenarios, X11 is more likely to show edge-case problems.&lt;/p&gt;
&lt;p&gt;Also, X11 maintenance has gradually shifted toward compatibility.
Mainstream desktop environments still support X11, but new features and optimizations usually land on Wayland first.&lt;/p&gt;
&lt;h2 id=&#34;strengths-of-wayland&#34;&gt;Strengths of Wayland
&lt;/h2&gt;&lt;p&gt;Wayland&amp;rsquo;s advantages are mainly about the modern desktop experience.&lt;/p&gt;
&lt;p&gt;Its rendering path is more direct.
Applications render buffers, and the compositor handles unified composition and display, reducing the detours in the traditional X11 architecture.
For animation, window movement, high refresh rates, multi-monitor setups, touchpad gestures, and fractional scaling, Wayland is easier to implement cleanly.&lt;/p&gt;
&lt;p&gt;Security is another major advantage of Wayland.
Applications cannot freely capture other windows by default, nor can they unconditionally listen to global keyboard input.
Screenshots, recording, and screen sharing require user authorization and are usually handled through desktop portals and PipeWire.&lt;/p&gt;
&lt;p&gt;Wayland is also friendlier to modern hardware.
Touchpad gestures, HiDPI, variable refresh rate, and different scaling factors per monitor are usually more natural under Wayland.
GNOME and KDE have also put many desktop-experience improvements into their Wayland sessions in recent years.&lt;/p&gt;
&lt;h2 id=&#34;weaknesses-of-wayland&#34;&gt;Weaknesses of Wayland
&lt;/h2&gt;&lt;p&gt;Wayland&amp;rsquo;s issue is not that it &amp;ldquo;cannot be used&amp;rdquo;; it is that the ecosystem is still migrating.&lt;/p&gt;
&lt;p&gt;Some tools historically relied on X11&amp;rsquo;s open capabilities, such as global key listening, window enumeration, automatic clicking, screen capture, and window movement.
These cannot be copied directly to Wayland. They must be implemented through portals, compositor protocols, or desktop-environment APIs.
As a result, some older tools stop working or only work under specific desktop environments.&lt;/p&gt;
&lt;p&gt;Remote desktop is a typical example.
X11 has a historical design around network transparency. Modern experience is not always perfect, but many tools have matured around it.
Under Wayland, remote desktop requires PipeWire, RDP, VNC, desktop portals, or compositor support, and the experience depends on GNOME, KDE, Sway, or other environments.&lt;/p&gt;
&lt;p&gt;Input methods were also once a pain point.
Fcitx5 and IBus have improved significantly on mainstream Wayland desktops, but some Electron applications, old programs, or special combinations may still have issues with candidate-window position, focus, or shortcuts.&lt;/p&gt;
&lt;p&gt;NVIDIA was also a long-standing obstacle for Wayland.
In recent years, NVIDIA driver and desktop-environment support has improved a lot, but if you use an old GPU, old driver, or unusual multi-monitor setup, X11 may still be more stable.&lt;/p&gt;
&lt;h2 id=&#34;what-xwayland-does&#34;&gt;What Xwayland Does
&lt;/h2&gt;&lt;p&gt;Many people think that after switching to Wayland, X11 applications cannot be used at all.
That is not the case.&lt;/p&gt;
&lt;p&gt;Wayland desktops usually use &lt;code&gt;Xwayland&lt;/code&gt; to run old X11 applications.
The application thinks it is running on X11, while its window content is handed to the Wayland compositor for display.&lt;/p&gt;
&lt;p&gt;This makes migration much smoother:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;native Wayland applications use Wayland;&lt;/li&gt;
&lt;li&gt;old X11 applications use Xwayland;&lt;/li&gt;
&lt;li&gt;users can run both kinds of programs in the same desktop session.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, Xwayland is not magic.
If a tool depends on global input listening, window-management scripts, or low-level X11 extensions, it may still be restricted.&lt;/p&gt;
&lt;h2 id=&#34;which-one-performs-better&#34;&gt;Which One Performs Better?
&lt;/h2&gt;&lt;p&gt;You cannot simply say Wayland is always faster than X11, or that X11 is always more stable.
Real performance depends on the desktop environment, graphics driver, application type, and use case.&lt;/p&gt;
&lt;p&gt;In general:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;for ordinary desktop animation and high-refresh-rate display, Wayland often feels smoother;&lt;/li&gt;
&lt;li&gt;for mixed DPI and multi-monitor scaling, Wayland has an advantage;&lt;/li&gt;
&lt;li&gt;for old applications and special tools, X11 is less likely to surprise you;&lt;/li&gt;
&lt;li&gt;for gaming, Wayland is already quite mature through Xwayland and native support, but some games or capture tools may still prefer X11;&lt;/li&gt;
&lt;li&gt;for professional graphics, remote control, and automation scripts, test the specific tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For most ordinary users, performance is not the main difference.
The real experience is decided by compatibility, security boundaries, monitor configuration, and input-device support.&lt;/p&gt;
&lt;h2 id=&#34;screenshots-recording-and-screen-sharing&#34;&gt;Screenshots, Recording, and Screen Sharing
&lt;/h2&gt;&lt;p&gt;This is one of the most commonly misunderstood parts of Wayland.&lt;/p&gt;
&lt;p&gt;Under X11, screenshot and recording tools can usually capture the screen directly.
That is convenient, but it also means malicious programs can more easily spy on the screen.&lt;/p&gt;
&lt;p&gt;Under Wayland, applications cannot capture the screen freely.
Screenshots, recording, streaming, and meeting screen sharing usually need to go through desktop portals and PipeWire, with user authorization.
This is safer, but it requires applications to support the newer interfaces.&lt;/p&gt;
&lt;p&gt;So if a meeting app, recording tool, or screenshot tool does not work well under Wayland, it does not necessarily mean Wayland &amp;ldquo;does not support it&amp;rdquo;. More likely, the application has not adapted well to portals or PipeWire.&lt;/p&gt;
&lt;h2 id=&#34;which-one-should-gamers-use&#34;&gt;Which One Should Gamers Use?
&lt;/h2&gt;&lt;p&gt;Linux gaming is no longer X11-only.
Steam, Proton, Mesa, KDE, GNOME, Gamescope, and Xwayland have made Wayland gaming much better.&lt;/p&gt;
&lt;p&gt;If you use an AMD or Intel GPU, Wayland can usually serve as a daily gaming environment.
If you use NVIDIA, newer drivers are also increasingly usable, but it is best to keep the driver and desktop environment up to date.&lt;/p&gt;
&lt;p&gt;Gamers can choose like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ordinary Steam / Proton games: try Wayland first;&lt;/li&gt;
&lt;li&gt;if recording, streaming, overlays, or input latency have issues: compare with X11;&lt;/li&gt;
&lt;li&gt;if you use Gamescope: the Wayland ecosystem fits better;&lt;/li&gt;
&lt;li&gt;if you use an old GPU or old driver: X11 may be easier.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;remote-desktop-and-automation&#34;&gt;Remote Desktop and Automation
&lt;/h2&gt;&lt;p&gt;If your workflow depends on remote desktop, window automation, or global keyboard/mouse control, be more cautious.&lt;/p&gt;
&lt;p&gt;X11 has many tools and direct behavior in these scenarios.
For example, controlling windows with scripts, simulating clicks, and capturing a specific window are usually easier under X11.&lt;/p&gt;
&lt;p&gt;Wayland&amp;rsquo;s security design does not allow ordinary applications to control other windows freely.
This means automation tools need to use interfaces provided by the desktop environment, or use dedicated remote-desktop implementations.
GNOME and KDE are filling in these capabilities, but consistency across desktops is still not as good as X11.&lt;/p&gt;
&lt;p&gt;If you are an ordinary desktop user, Wayland is fine.
If you heavily depend on remote control, automated testing, or window-management scripts, X11 may still fit better.&lt;/p&gt;
&lt;h2 id=&#34;how-to-check-which-one-you-are-using&#34;&gt;How to Check Which One You Are Using
&lt;/h2&gt;&lt;p&gt;You can check the current session type with an environment variable:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$XDG_SESSION_TYPE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the output is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;wayland
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;you are in a Wayland session.&lt;/p&gt;
&lt;p&gt;If the output is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;x11
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;you are in an X11 session.&lt;/p&gt;
&lt;p&gt;On GNOME, KDE, and similar desktops, you can usually switch between X11 and Wayland from the gear menu or session selector on the login screen.&lt;/p&gt;
&lt;h2 id=&#34;selection-advice&#34;&gt;Selection Advice
&lt;/h2&gt;&lt;p&gt;You can decide this way:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Scenario&lt;/th&gt;
          &lt;th&gt;Recommendation&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;New computer, mainstream distribution, ordinary office work&lt;/td&gt;
          &lt;td&gt;Prefer Wayland&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Latest GNOME / KDE versions&lt;/td&gt;
          &lt;td&gt;Prefer Wayland&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Multi-monitor, HiDPI, high refresh rate&lt;/td&gt;
          &lt;td&gt;Prefer Wayland&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Old software, old GPU, old driver&lt;/td&gt;
          &lt;td&gt;Prefer X11&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Remote desktop, window scripts, automated testing&lt;/td&gt;
          &lt;td&gt;Prefer X11 or test Wayland item by item&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Gaming&lt;/td&gt;
          &lt;td&gt;Try Wayland first, switch to X11 if there are issues&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Meeting screen sharing, recording&lt;/td&gt;
          &lt;td&gt;Depends on PipeWire / portal support in the software&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Security-sensitive, multi-user desktop&lt;/td&gt;
          &lt;td&gt;Prefer Wayland&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Wayland is the future direction, but X11 is not disappearing immediately.
The two will continue to coexist for some time.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;X11&amp;rsquo;s strengths are maturity, compatibility, and a large tool ecosystem.
It suits old software, remote desktop, window automation, and special workflows.
Its weaknesses are weak security boundaries, complex architecture, and a less clean fit for modern multi-monitor, high-refresh-rate, and mixed-scaling setups.&lt;/p&gt;
&lt;p&gt;Wayland&amp;rsquo;s strengths are a more modern architecture, better security, a more direct display path, and better support for HiDPI, touchpad gestures, multi-monitor use, and modern desktop experience.
Its weaknesses are adaptation costs for some old tools, remote control, screenshots/recording, and input-method scenarios.&lt;/p&gt;
&lt;p&gt;Ordinary users can treat Wayland as the default choice.
If a particular application or device behaves incorrectly, switch back to X11 and compare.
For the Linux desktop, this is not about taking sides. It is about choosing the option that best fits your hardware, software, and workflow.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://wayland.freedesktop.org/architecture.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Wayland Architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://wayland.freedesktop.org/faq.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Wayland FAQ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://wayland.freedesktop.org/xserver.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Xwayland Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://wiki.archlinux.org/title/Wayland&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;ArchWiki: Wayland&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Linux Kernel 7.0 Feature Update Overview</title>
        <link>https://knightli.com/en/2026/05/01/linux-kernel-7-0-new-features/</link>
        <pubDate>Fri, 01 May 2026 14:46:07 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/01/linux-kernel-7-0-new-features/</guid>
        <description>&lt;p&gt;Linux kernel version numbers have never followed semantic versioning. A major version bump is more about the project&amp;rsquo;s rolling maintenance rhythm.
In the release message, Linus Torvalds also described 7.0 as a normal release: the final week mostly contained small fixes across networking, architecture code, tools, selftests, and drivers.&lt;/p&gt;
&lt;p&gt;What is really worth watching is the set of incremental changes itself.
Linux 7.0 covers file systems, memory management, hardware support, security isolation, Rust support, and driver cleanup.&lt;/p&gt;
&lt;h2 id=&#34;file-systems-xfs-ext4-and-ntfs3-all-changed&#34;&gt;File Systems: XFS, EXT4, and NTFS3 All Changed
&lt;/h2&gt;&lt;p&gt;File systems are one of the most visible update areas in Linux 7.0.&lt;/p&gt;
&lt;p&gt;XFS introduces self-healing-related capabilities.
Together with a new generic file-system error reporting mechanism, file systems can report metadata corruption and I/O errors to user space in a more unified way.
With suitable system service support, XFS can automatically handle some repair flows while the file system remains mounted.
This does not mean every disk corruption problem can be fixed painlessly, but for servers and long-running systems, the detection and repair path is more complete.&lt;/p&gt;
&lt;p&gt;EXT4 continues to improve concurrent direct I/O write performance.
If a machine often runs backups, builds, downloads, databases, or log tasks that write to disk at the same time, these optimizations should make concurrent write paths steadier.
It is not the kind of change every desktop user will immediately notice, but it matters for heavy I/O scenarios.&lt;/p&gt;
&lt;p&gt;NTFS3 also receives a larger driver update, including delayed allocation, iomap-based file operations, and better readahead for large directory scans.
If you often access Windows partitions or external NTFS disks from Linux, these updates are worth noting.&lt;/p&gt;
&lt;p&gt;In addition, exFAT improves multi-cluster sequential reads, which can make sequential reading faster on some small-cluster devices.&lt;/p&gt;
&lt;h2 id=&#34;memory-and-swap-better-behavior-under-memory-pressure&#34;&gt;Memory and Swap: Better Behavior Under Memory Pressure
&lt;/h2&gt;&lt;p&gt;Linux 7.0 continues the cleanup work around the swap subsystem from recent releases.
One focus is improving the path for reading pages back from swap, especially when multiple processes share the same swapped-out pages.
Throughput should be better in those cases.&lt;/p&gt;
&lt;p&gt;For desktop users, this may not feel like the system suddenly becoming faster.
But on memory-constrained systems, dense container hosts, Redis-like services with persistence enabled, or zram setups backed by disk, these changes can reduce jitter under memory pressure.&lt;/p&gt;
&lt;p&gt;zram paths also receive optimizations.
Previously, in some cases, the kernel needed to decompress zram pages before writing them to a backing device.
The new path can write compressed data directly, reducing unnecessary processing.&lt;/p&gt;
&lt;h2 id=&#34;cpu-and-performance-intel-tsx-auto-faster-threads-and-file-operations&#34;&gt;CPU and Performance: Intel TSX auto, Faster Threads and File Operations
&lt;/h2&gt;&lt;p&gt;Linux 7.0 adjusts the default policy for Intel TSX.
Because of past security issues, TSX was disabled by default on many processors.
The kernel now uses a more precise &lt;code&gt;auto&lt;/code&gt; policy: affected CPUs continue to keep it disabled, while unaffected or suitable CPUs can enable it automatically.&lt;/p&gt;
&lt;p&gt;This can help some multithreaded workloads, especially applications that rely on transactional synchronization extensions.
It is not a universal acceleration switch; the actual benefit still depends on the CPU model and whether the application uses the feature.&lt;/p&gt;
&lt;p&gt;Linux 7.0 also includes optimizations for PID allocation, thread creation and destruction, and file open/close paths.
These optimizations usually do not become headline features on their own, but they accumulate into small gains in system responsiveness and high-concurrency services.&lt;/p&gt;
&lt;h2 id=&#34;hardware-support-new-platform-enablement-and-existing-device-improvements&#34;&gt;Hardware Support: New Platform Enablement and Existing Device Improvements
&lt;/h2&gt;&lt;p&gt;Linux 7.0 continues a large amount of hardware enablement work.
These updates usually fall into two groups: preparation for platforms that are not yet widely available, and improvements for devices already in users&amp;rsquo; hands.&lt;/p&gt;
&lt;p&gt;For new platforms, Linux 7.0 includes more preparation for Intel Nova Lake, Intel Crescent Island, new AMD graphics IP, and AMD Zen 6.
These changes may not matter to ordinary users right away, but they determine whether new hardware can receive mainline kernel support more quickly after release.&lt;/p&gt;
&lt;p&gt;On ARM64 and single-board computers, H.264/H.265 hardware video decoding for Rockchip RK3588/RK3576 enters the mainline support scope.
This means devices such as Orange Pi 5 and Radxa ROCK 5 no longer need to rely entirely on vendor BSP kernels for hardware decoding.&lt;/p&gt;
&lt;p&gt;There are also many detailed updates for laptops and peripherals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ASUS WMI improves backlight, keyboard lighting, and fan hotkey support for ROG and TUF models.&lt;/li&gt;
&lt;li&gt;HP WMI adds manual fan control for some Victus models and fixes audio indicator lights.&lt;/li&gt;
&lt;li&gt;Lenovo WMI exposes more HWMON monitoring information for Legion devices.&lt;/li&gt;
&lt;li&gt;The Intel Xe graphics driver exposes more temperature sensors.&lt;/li&gt;
&lt;li&gt;Intel Arc B-series discrete GPUs can enter deeper PCIe power-saving states.&lt;/li&gt;
&lt;li&gt;Rock Band 4 Bluetooth guitars and the Logitech K980 Bluetooth keyboard get better kernel support.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of these changes is small on its own, but for laptop, gaming device, development board, and peripheral users, more complete mainline support makes future distribution maintenance easier.&lt;/p&gt;
&lt;h2 id=&#34;security-and-isolation-io_uring-can-use-bpf-filtering&#34;&gt;Security and Isolation: io_uring Can Use BPF Filtering
&lt;/h2&gt;&lt;p&gt;Linux 7.0 adds BPF filtering support to &lt;code&gt;io_uring&lt;/code&gt;.
This matters for containers, sandboxes, and environments with high security requirements.&lt;/p&gt;
&lt;p&gt;In the past, some administrators disabled &lt;code&gt;io_uring&lt;/code&gt; entirely to reduce attack surface.
With BPF filtering, they can now restrict allowed operations more precisely instead of choosing only between fully enabled and fully disabled.&lt;/p&gt;
&lt;p&gt;This does not make &lt;code&gt;io_uring&lt;/code&gt; risks disappear automatically, but it gives system administrators and runtime frameworks a more controllable isolation tool.&lt;/p&gt;
&lt;h2 id=&#34;rust-support-is-no-longer-just-an-experimental-label&#34;&gt;Rust Support Is No Longer Just an Experimental Label
&lt;/h2&gt;&lt;p&gt;In Linux 7.0, the status of Rust for Linux becomes more stable.
This does not mean the kernel will be rewritten in Rust at large scale, nor does it mean C is being replaced.&lt;/p&gt;
&lt;p&gt;More precisely, the infrastructure for Rust in the kernel has entered a more formal stage.
Future drivers, subsystems, or some security-sensitive code can choose Rust where it fits.
This is a gradual path: stabilize the interfaces, build system, documentation, and maintenance process first, then let actual code grow over time.&lt;/p&gt;
&lt;h2 id=&#34;removing-old-functionality-laptop_mode-is-gone&#34;&gt;Removing Old Functionality: laptop_mode Is Gone
&lt;/h2&gt;&lt;p&gt;Linux 7.0 removes &lt;code&gt;laptop_mode&lt;/code&gt;.
This was a long-standing power-saving feature mainly designed for the hard-disk laptop era, reducing disk wakeups to save power.&lt;/p&gt;
&lt;p&gt;Modern laptops are mostly SSD-based, and the kernel&amp;rsquo;s memory reclaim, block device, and file-system paths have changed a lot.
Keeping this old mechanism increases maintenance cost, and its test coverage was not ideal.
Removing it reduces the impact of old code on modern paths.&lt;/p&gt;
&lt;h2 id=&#34;ai-related-keys-preparing-for-a-new-generation-of-keyboard-interaction&#34;&gt;AI-Related Keys: Preparing for a New Generation of Keyboard Interaction
&lt;/h2&gt;&lt;p&gt;Linux 7.0 adds several new HID keycodes for contextual AI interaction, such as acting on selected content, inserting context-generated content, and starting contextual queries.&lt;/p&gt;
&lt;p&gt;This is not AI functionality built into the kernel.
It is more like reserving input event definitions for future laptop keyboards and peripherals, so desktop environments, applications, or vendor tools can recognize those keys.
What they actually do still depends on distribution, desktop environment, and application-level integration.&lt;/p&gt;
&lt;h2 id=&#34;should-you-upgrade-immediately&#34;&gt;Should You Upgrade Immediately?
&lt;/h2&gt;&lt;p&gt;If you use a rolling distribution, Linux 7.0 will likely arrive naturally through system updates.
If you use a newer distribution such as Ubuntu 26.04 LTS, 7.0 may also appear as the default or primary kernel version.&lt;/p&gt;
&lt;p&gt;But if your machine is a production server, NAS, virtualization host, or depends on closed-source drivers and proprietary kernel modules, do not upgrade manually just because the version number became 7.0.
A safer approach is to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;wait for the distribution to provide official kernel packages;&lt;/li&gt;
&lt;li&gt;check compatibility for graphics cards, network cards, ZFS, VirtualBox, VMware, and DKMS modules;&lt;/li&gt;
&lt;li&gt;test first on a test machine or snapshot environment;&lt;/li&gt;
&lt;li&gt;watch the 7.0.x point releases.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As of the kernel.org v7.x directory, 7.0.1, 7.0.2, and 7.0.3 have already been released.
If you plan to build or test manually, prefer the latest stable 7.0.x release instead of focusing only on the initial 7.0 tarball.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Linux Kernel 7.0 is not a release that rewrites everything just because the major version changed.
It is closer to a broad regular kernel update: file systems are more reliable, swap and I/O paths continue to improve, new hardware support moves forward, and Rust, &lt;code&gt;io_uring&lt;/code&gt; isolation, and HID input definitions fill in infrastructure needed for long-term evolution.&lt;/p&gt;
&lt;p&gt;For ordinary desktop users, the most practical changes may come from hardware support, graphics drivers, power saving, and file-system repair.
For servers and developers, XFS error reporting, self-healing, &lt;code&gt;io_uring&lt;/code&gt; BPF filtering, swap optimization, and new platform support are more worth watching.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.kernel.org/pub/linux/kernel/v7.x/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;kernel.org: Linux kernel v7.x directory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.spinics.net/lists/kernel/msg6151145.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Linux 7.0 release message mirror&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.phoronix.com/news/Linux-7.0-Released&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Phoronix: Linux 7.0 Released With New Hardware Support, Optimizations &amp;amp; Self-Healing XFS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.omgubuntu.co.uk/2026/04/linux-7-0-kernel-features&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;OMG! Ubuntu: Linux 7.0 kernel brings faster swap &amp;amp; Rock Band 4 controller support&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Ubuntu 26.04 LTS GPU and Hardware Updates: CUDA, ROCm, DPC&#43;&#43;, and More Platform Changes</title>
        <link>https://knightli.com/en/2026/04/26/ubuntu-26-04-lts-gpu-hardware-ai-updates/</link>
        <pubDate>Sun, 26 Apr 2026 19:35:57 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/26/ubuntu-26-04-lts-gpu-hardware-ai-updates/</guid>
        <description>&lt;p&gt;If the previous article worked as a desktop-focused overview of &lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt;, this one is better read as its hardware and compute-side follow-up. In this &lt;code&gt;26.04&lt;/code&gt; cycle, Ubuntu pushed a number of AI, GPU computing, and platform compatibility changes into the main archive or formal support scope.&lt;/p&gt;
&lt;p&gt;The short version is this: the most important part of this round is not just desktop and kernel upgrades, but that &lt;strong&gt;Ubuntu is bringing Intel, NVIDIA, and AMD GPU computing stacks into the distribution in a more systematic way&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;1-intel-dpc-and-related-components-are-now-in-ubuntu-archive&#34;&gt;1. Intel DPC++ and related components are now in Ubuntu Archive
&lt;/h2&gt;&lt;p&gt;Starting with &lt;code&gt;26.04&lt;/code&gt;, Intel&amp;rsquo;s open-source &lt;code&gt;oneAPI DPC++&lt;/code&gt; compiler is available directly from Ubuntu Archive for building &lt;code&gt;SYCL&lt;/code&gt; code. Its runtime also includes adapters for Intel GPUs.&lt;/p&gt;
&lt;p&gt;Two related components are also now available from Ubuntu repositories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;oneDPL&lt;/code&gt;, the DPC++ library, which provides higher-productivity developer APIs&lt;/li&gt;
&lt;li&gt;&lt;code&gt;oneDNN&lt;/code&gt;, built with &lt;code&gt;dpclang-6&lt;/code&gt;, which can run on Intel GPUs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That means if you are already working with &lt;code&gt;SYCL&lt;/code&gt;, heterogeneous computing, or AI workloads on Intel GPUs, Ubuntu now offers a more direct path instead of forcing you to maintain a separate external stack for everything.&lt;/p&gt;
&lt;p&gt;Ubuntu also calls out one practical requirement: users need to be in the &lt;code&gt;render&lt;/code&gt; group to actually use these Intel GPU-related capabilities.&lt;/p&gt;
&lt;h2 id=&#34;2-the-nvidia-cuda-toolkit-can-now-be-installed-directly-with-apt&#34;&gt;2. The NVIDIA CUDA toolkit can now be installed directly with &lt;code&gt;apt&lt;/code&gt;
&lt;/h2&gt;&lt;p&gt;For many developers and operators, this may be one of the most immediately useful changes in the notes.&lt;/p&gt;
&lt;p&gt;Starting with &lt;code&gt;26.04&lt;/code&gt;, the &lt;code&gt;NVIDIA CUDA toolkit&lt;/code&gt; can now be installed directly from Ubuntu Archive:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt install cuda-toolkit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The value here is bigger than just saving a few setup steps.&lt;/p&gt;
&lt;p&gt;For developers shipping software on Ubuntu, this new model means they can simply declare a dependency on the &lt;code&gt;CUDA runtime&lt;/code&gt;, while Ubuntu manages installation and compatibility at the distribution level. That makes CUDA feel more like a native system capability on Ubuntu, rather than an extra software layer that always has to be maintained separately.&lt;/p&gt;
&lt;h2 id=&#34;3-amd-rocm-710-is-now-in-universe&#34;&gt;3. AMD ROCm 7.1.0 is now in Universe
&lt;/h2&gt;&lt;p&gt;On the AMD side, Ubuntu Universe now includes &lt;code&gt;ROCm 7.1.0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;These libraries mainly provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;backend infrastructure for AI training and inference on AMD GPUs&lt;/li&gt;
&lt;li&gt;software foundations for machine learning and high performance computing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Canonical also notes that ROCm-related components are continuously tested in its CI/CD pipeline. Beyond &lt;code&gt;autopkgtests&lt;/code&gt;, that includes several user-space applications such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;llama.cpp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pytorch&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Blender&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Lemonade Server&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That detail matters, because it shows Ubuntu is not just dropping packages into the archive. It is validating ROCm as a maintainable software stack.&lt;/p&gt;
&lt;h2 id=&#34;4-the-bigger-story-is-that-all-three-gpu-ecosystems-are-landing&#34;&gt;4. The bigger story is that all three GPU ecosystems are landing
&lt;/h2&gt;&lt;p&gt;It becomes easier to see the direction of &lt;code&gt;26.04&lt;/code&gt; when &lt;code&gt;DPC++&lt;/code&gt;, &lt;code&gt;CUDA&lt;/code&gt;, and &lt;code&gt;ROCm&lt;/code&gt; are viewed together:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Intel: bringing &lt;code&gt;SYCL&lt;/code&gt; / &lt;code&gt;oneAPI&lt;/code&gt; components into official repositories&lt;/li&gt;
&lt;li&gt;NVIDIA: giving the &lt;code&gt;CUDA toolkit&lt;/code&gt; a distribution-managed installation path&lt;/li&gt;
&lt;li&gt;AMD: shipping &lt;code&gt;ROCm 7.1.0&lt;/code&gt; in Universe with ongoing testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you work with these kinds of workloads on Ubuntu, this release will probably feel more relevant:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;local LLM inference&lt;/li&gt;
&lt;li&gt;GPU-accelerated training or fine-tuning&lt;/li&gt;
&lt;li&gt;Blender, scientific computing, and HPC&lt;/li&gt;
&lt;li&gt;development environments that need to move across different GPU platforms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In other words, Ubuntu is no longer just &amp;ldquo;a system where you can install a GPU driver.&amp;rdquo; It is starting to carry a fuller &lt;strong&gt;user-space software stack for AI and GPU computing&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;5-nvidia-dynamic-boost-is-enabled-by-default&#34;&gt;5. NVIDIA Dynamic Boost is enabled by default
&lt;/h2&gt;&lt;p&gt;Since &lt;code&gt;25.04&lt;/code&gt;, &lt;code&gt;Dynamic Boost&lt;/code&gt; has been enabled by default on supported NVIDIA laptops.&lt;/p&gt;
&lt;p&gt;The idea is straightforward: depending on system load, power can be shifted dynamically between the CPU and GPU. In gaming scenarios, that usually means giving more power to the GPU when needed to extract more performance.&lt;/p&gt;
&lt;p&gt;It only applies under two conditions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the laptop is connected to AC power&lt;/li&gt;
&lt;li&gt;the GPU load is high enough&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It does not engage while the system is running on battery.&lt;/p&gt;
&lt;h2 id=&#34;6-support-for-new-intel-integrated-and-discrete-gpus-keeps-moving-forward&#34;&gt;6. Support for new Intel integrated and discrete GPUs keeps moving forward
&lt;/h2&gt;&lt;p&gt;Ubuntu also continues expanding support for new Intel GPUs, including:&lt;/p&gt;
&lt;p&gt;Integrated:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Intel Core Ultra Xe2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Intel Core Ultra Xe3&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Discrete:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Intel Arc 5 B570&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Intel Arc 5 B580&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Intel Arc Pro B50&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Intel Arc Pro B60&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Intel Arc Pro B65&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Intel Arc Pro B70&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ubuntu also highlights several features already available around these devices:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;improved GPU and CPU ray tracing performance through Intel Embree, benefiting applications such as &lt;code&gt;Blender 4.2+&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;hardware video encoding for &lt;code&gt;AVC&lt;/code&gt;, &lt;code&gt;JPEG&lt;/code&gt;, &lt;code&gt;HEVC&lt;/code&gt;, and &lt;code&gt;AV1&lt;/code&gt; on &amp;ldquo;Battlemage&amp;rdquo; devices&lt;/li&gt;
&lt;li&gt;a new &lt;code&gt;CCS&lt;/code&gt; optimization in Intel Compute Runtime&lt;/li&gt;
&lt;li&gt;enabled debugging support for Intel Xe GPUs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are watching follow-up releases, &lt;code&gt;25.10&lt;/code&gt; also continues to bring in more capabilities, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;initial support for Intel&amp;rsquo;s next-generation client platform codenamed &lt;code&gt;Panther Lake&lt;/code&gt; through &lt;code&gt;Linux kernel 6.17&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;improved IOMMU, PCIe subsystem, and multi-GPU support&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Mesa 25.2.3&lt;/code&gt; enabling &lt;code&gt;VK_KHR_shader_bfloat16&lt;/code&gt; for Battlemage and Panther Lake&lt;/li&gt;
&lt;li&gt;&lt;code&gt;intel-media-driver 25.3.0&lt;/code&gt; adding Panther Lake decode support and &lt;code&gt;VP9&lt;/code&gt; encoding&lt;/li&gt;
&lt;li&gt;&lt;code&gt;intel-compute-runtime 25.31&lt;/code&gt; adjusting the Level Zero &lt;code&gt;USM&lt;/code&gt; pool and local device memory event allocation behavior&lt;/li&gt;
&lt;li&gt;&lt;code&gt;level-zero 1.24&lt;/code&gt; and &lt;code&gt;level-zero-raytracing 1.1.0&lt;/code&gt; bringing broader spec and RTAS extension support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;7-suspend-and-resume-is-more-stable-on-nvidia-desktops-too&#34;&gt;7. Suspend and resume is more stable on Nvidia desktops too
&lt;/h2&gt;&lt;p&gt;Starting with &lt;code&gt;25.10&lt;/code&gt;, Ubuntu enables suspend-resume support in the proprietary &lt;code&gt;Nvidia&lt;/code&gt; driver to reduce corruption and freezing when waking a desktop system.&lt;/p&gt;
&lt;p&gt;This is not the most visible kind of change, but it matters a lot in everyday use, especially on desktops that stay on for long periods and frequently suspend and resume.&lt;/p&gt;
&lt;h2 id=&#34;8-arm-raspberry-pi-risc-v-and-ibm-z-also-get-harder-platform-level-changes&#34;&gt;8. ARM, Raspberry Pi, RISC-V, and IBM Z also get harder platform-level changes
&lt;/h2&gt;&lt;p&gt;Beyond the GPU software stack, the release notes also include several platform-level changes worth calling out separately.&lt;/p&gt;
&lt;h3 id=&#34;arm64-desktop-platforms&#34;&gt;ARM64 desktop platforms
&lt;/h3&gt;&lt;p&gt;Starting with &lt;code&gt;25.10&lt;/code&gt;, the &lt;code&gt;ARM64&lt;/code&gt; &lt;code&gt;linux-generic&lt;/code&gt; kernel provides broader desktop compatibility for ARM64 desktop platforms that boot through &lt;code&gt;UEFI&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;a-new-raspberry-pi-boot-layout&#34;&gt;A new Raspberry Pi boot layout
&lt;/h3&gt;&lt;p&gt;One change introduced in &lt;code&gt;25.10&lt;/code&gt; and refined in &lt;code&gt;26.04&lt;/code&gt; is a new boot partition layout for Raspberry Pi systems.&lt;/p&gt;
&lt;p&gt;Its goal is to improve boot reliability: newly written boot assets are first &amp;ldquo;tested&amp;rdquo; before they are committed as the new &amp;ldquo;known good&amp;rdquo; set.&lt;/p&gt;
&lt;p&gt;The firmware date requirements are the part most users will want to remember:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Pi 3 / 3+ / CM3+ / Zero 2W&lt;/code&gt;: no additional action required, the boot firmware is in the image itself&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Pi 4 / 400 / CM4&lt;/code&gt;: boot firmware must be dated no earlier than &lt;code&gt;2022-11-25&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Pi 5 / 500 / CM5&lt;/code&gt;: boot firmware must be dated no earlier than &lt;code&gt;2025-02-11&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can check it with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rpi-eeprom-update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the firmware is too old and you are using &lt;code&gt;Ubuntu 24.04 LTS&lt;/code&gt; or newer, you can update it like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rpi-eeprom-update -a
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo reboot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;raspberry-pi-desktop-images-now-use-desktop-minimal&#34;&gt;Raspberry Pi desktop images now use desktop-minimal
&lt;/h3&gt;&lt;p&gt;Since &lt;code&gt;25.10&lt;/code&gt;, Ubuntu Desktop images for Raspberry Pi are based on &lt;code&gt;desktop-minimal&lt;/code&gt; rather than the full &lt;code&gt;desktop&lt;/code&gt; seed.&lt;/p&gt;
&lt;p&gt;Ubuntu gives a very concrete benefit here: the default app set is smaller, saving about &lt;code&gt;777MB&lt;/code&gt; on the uncompressed image and on installed systems.&lt;/p&gt;
&lt;p&gt;If you want to remove that default app set in bulk after upgrading, you can use:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt purge ubuntu-desktop --autoremove
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you want to keep some of those applications, just mark them as manually installed with &lt;code&gt;apt&lt;/code&gt; first.&lt;/p&gt;
&lt;h3 id=&#34;swap-on-raspberry-pi-is-now-handled-by-cloud-init&#34;&gt;Swap on Raspberry Pi is now handled by cloud-init
&lt;/h3&gt;&lt;p&gt;Since &lt;code&gt;25.10&lt;/code&gt;, swap file creation on Raspberry Pi desktop images is handled by &lt;code&gt;cloud-init&lt;/code&gt;.&lt;br&gt;
If you want to customize swap size before first boot, you can edit &lt;code&gt;user-data&lt;/code&gt; on the boot partition directly.&lt;/p&gt;
&lt;h3 id=&#34;risc-v-requirements-have-moved-up&#34;&gt;RISC-V requirements have moved up
&lt;/h3&gt;&lt;p&gt;Starting with &lt;code&gt;25.10&lt;/code&gt;, the &lt;code&gt;RISC-V&lt;/code&gt; build of &lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt; requires hardware that implements the &lt;code&gt;RVA23S64 ISA profile&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Systems that do not meet that requirement can no longer run &lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt;. If you still have boards based on earlier &lt;code&gt;RVA20&lt;/code&gt; processor cores, you need to stay on the support line provided by &lt;code&gt;Ubuntu 24.04 LTS&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;According to Ubuntu, as of &lt;code&gt;April 2026&lt;/code&gt;, there is still no real &lt;code&gt;RVA23S64&lt;/code&gt; hardware available. So the only currently supported platform is effectively a &lt;code&gt;QEMU&lt;/code&gt; virtualized environment configured with &lt;code&gt;-cpu rva23s64&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;ibm-z-now-requires-z15-at-minimum&#34;&gt;IBM Z now requires z15 at minimum
&lt;/h3&gt;&lt;p&gt;Starting with &lt;code&gt;26.04&lt;/code&gt;, the minimum requirement for the &lt;code&gt;s390x&lt;/code&gt; architecture has moved up to &lt;code&gt;z15&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;z14&lt;/code&gt; / &lt;code&gt;LinuxONE II&lt;/code&gt; and older systems can no longer install &lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;z15&lt;/code&gt; / &lt;code&gt;LinuxONE III&lt;/code&gt; and newer systems should see better performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;9-who-should-read-this-first&#34;&gt;9. Who should read this first
&lt;/h2&gt;&lt;p&gt;This article is more useful than the desktop overview if you fall into any of these cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;you use Ubuntu for &lt;code&gt;CUDA&lt;/code&gt;, &lt;code&gt;ROCm&lt;/code&gt;, &lt;code&gt;SYCL&lt;/code&gt;, or local AI inference&lt;/li&gt;
&lt;li&gt;you do development or compute work on Intel, NVIDIA, or AMD GPUs&lt;/li&gt;
&lt;li&gt;you maintain Raspberry Pi, ARM64, RISC-V, IBM Z, or other non-standard x86 platforms&lt;/li&gt;
&lt;li&gt;you are especially sensitive to repository availability, driver behavior, runtimes, and platform requirements after an upgrade&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;10-one-line-takeaway&#34;&gt;10. One-line takeaway
&lt;/h2&gt;&lt;p&gt;The key point of &lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt; on the hardware and AI stack side is not that one GPU vendor got a standout upgrade. It is that &lt;strong&gt;Intel&amp;rsquo;s DPC++, NVIDIA&amp;rsquo;s CUDA, and AMD&amp;rsquo;s ROCm are all entering the Ubuntu ecosystem in a more official, in-repository, and maintainable way&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you used to think of Ubuntu as &amp;ldquo;the system first, then I assemble the GPU environment myself,&amp;rdquo; &lt;code&gt;26.04&lt;/code&gt; starts to look more like a distribution that is willing to actively carry AI and heterogeneous computing workloads.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Ubuntu 26.04 LTS Released: Major Desktop Updates with GNOME 50 and Linux 7.0</title>
        <link>https://knightli.com/en/2026/04/26/ubuntu-26-04-lts-release-notes/</link>
        <pubDate>Sun, 26 Apr 2026 16:10:25 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/26/ubuntu-26-04-lts-release-notes/</guid>
        <description>&lt;p&gt;&lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt; was released on &lt;strong&gt;April 23, 2026&lt;/strong&gt;, under the codename &lt;code&gt;Resolute Raccoon&lt;/code&gt;. This is the new long-term support release, with standard support through &lt;strong&gt;April 2031&lt;/strong&gt;. If you use &lt;code&gt;Ubuntu Pro&lt;/code&gt;, security maintenance can be extended to &lt;strong&gt;10 years&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you are upgrading from &lt;code&gt;Ubuntu 24.04 LTS&lt;/code&gt;, this is more than a routine release. It also folds in the major changes introduced across &lt;code&gt;24.10&lt;/code&gt;, &lt;code&gt;25.04&lt;/code&gt;, and &lt;code&gt;25.10&lt;/code&gt;. So this article works best as a quick guide to what is worth checking before you upgrade.&lt;/p&gt;
&lt;p&gt;If you only want the biggest takeaways from this release, remember these four points first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GNOME 50&lt;/code&gt; has landed in an LTS release, bringing clearer improvements to desktop experience and display support&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Linux kernel 7.0&lt;/code&gt; becomes the new baseline, refreshing both hardware support and the long-term maintenance base&lt;/li&gt;
&lt;li&gt;Ubuntu Desktop has now fully moved to &lt;code&gt;Wayland&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The default app set has been refreshed across the board, with major updates to &lt;code&gt;Firefox&lt;/code&gt;, &lt;code&gt;LibreOffice&lt;/code&gt;, &lt;code&gt;Thunderbird&lt;/code&gt;, and &lt;code&gt;GIMP&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;1-start-with-the-key-updates&#34;&gt;1. Start with the key updates
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt; is a long-term support release with standard support through &lt;code&gt;2031-04&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The desktop environment has been updated to &lt;code&gt;GNOME 50&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The generic kernel has moved to &lt;code&gt;Linux kernel 7.0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ubuntu Desktop now provides only a &lt;code&gt;Wayland&lt;/code&gt; session&lt;/li&gt;
&lt;li&gt;Older versions cannot jump directly to &lt;code&gt;26.04&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are still on &lt;code&gt;Ubuntu 22.04 LTS&lt;/code&gt; or &lt;code&gt;25.04&lt;/code&gt;, the official recommendation is to upgrade to &lt;code&gt;Ubuntu 24.04 LTS&lt;/code&gt; or &lt;code&gt;25.10&lt;/code&gt; first, then continue to &lt;code&gt;26.04 LTS&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;2-biggest-change-1-gnome-50-is-now-in-lts&#34;&gt;2. Biggest change #1: GNOME 50 is now in LTS
&lt;/h2&gt;&lt;p&gt;The most visible desktop-side change this time is that &lt;code&gt;GNOME 50&lt;/code&gt; has finally entered an LTS release. For most users, the value is not one flashy standalone feature, but a smoother desktop experience overall:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Better usability on small screens and narrow windows&lt;/li&gt;
&lt;li&gt;Notifications can be grouped by app&lt;/li&gt;
&lt;li&gt;Continued improvements to HDR, VRR, and fractional scaling&lt;/li&gt;
&lt;li&gt;Better smoothness and stability in remote desktop, Wayland, and NVIDIA-related scenarios&lt;/li&gt;
&lt;li&gt;Stronger accessibility support, including clear updates to the &lt;code&gt;Orca&lt;/code&gt; screen reader&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ubuntu has also added a few practical changes of its own:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GNOME Shell global search can directly find available &lt;code&gt;snap&lt;/code&gt; apps&lt;/li&gt;
&lt;li&gt;Web searches can also be triggered directly from search&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Yaru&lt;/code&gt; theme continues moving closer to upstream GNOME styling&lt;/li&gt;
&lt;li&gt;Permissions, file access, and drag-and-drop behavior for &lt;code&gt;snap&lt;/code&gt; apps feel more natural on the desktop&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you mainly use the desktop edition, the real point of this LTS is not a dramatic visual overhaul. It is that many small frictions from the past have been polished away together.&lt;/p&gt;
&lt;h2 id=&#34;3-biggest-change-2-the-default-apps-got-a-broad-refresh&#34;&gt;3. Biggest change #2: the default apps got a broad refresh
&lt;/h2&gt;&lt;p&gt;Compared with &lt;code&gt;24.04 LTS&lt;/code&gt;, the built-in app set in &lt;code&gt;26.04 LTS&lt;/code&gt; has been updated in a big way:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Firefox&lt;/code&gt; moves to &lt;code&gt;150&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;LibreOffice&lt;/code&gt; goes from &lt;code&gt;24.2&lt;/code&gt; to &lt;code&gt;25.8&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Thunderbird&lt;/code&gt; moves to &lt;code&gt;140&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;GIMP&lt;/code&gt; jumps from &lt;code&gt;2.10&lt;/code&gt; to &lt;code&gt;3.2&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are also several replacements that matter in day-to-day use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The PDF viewer is now &lt;code&gt;Papers&lt;/code&gt;, replacing &lt;code&gt;Evince&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The image viewer is now &lt;code&gt;Loupe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The terminal is now &lt;code&gt;Ptyxis&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The system monitor is now &lt;code&gt;Resources&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The default video player is now &lt;code&gt;Showtime&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The direction behind these changes is clear: Ubuntu is leaning more fully into a new generation of GNOME applications built on &lt;code&gt;GTK4&lt;/code&gt;, &lt;code&gt;libadwaita&lt;/code&gt;, and in some cases Rust-based rewrites.&lt;/p&gt;
&lt;h2 id=&#34;4-biggest-change-3-wayland-is-now-the-only-desktop-session&#34;&gt;4. Biggest change #3: Wayland is now the only desktop session
&lt;/h2&gt;&lt;p&gt;This is the most important change for many long-time users.&lt;/p&gt;
&lt;p&gt;The shift that started in &lt;code&gt;25.10&lt;/code&gt; is now fully settled in &lt;code&gt;26.04 LTS&lt;/code&gt;: Ubuntu Desktop runs only on the &lt;code&gt;Wayland&lt;/code&gt; backend, because &lt;code&gt;GNOME Shell&lt;/code&gt; can no longer run as an &lt;code&gt;X.org&lt;/code&gt; session.&lt;/p&gt;
&lt;p&gt;That does not mean old applications suddenly stop working. The official notes make it clear that &lt;code&gt;X.org&lt;/code&gt; applications can still run through the &lt;code&gt;XWayland&lt;/code&gt; compatibility layer. But if your workflow still depends on older graphics drivers, certain remote desktop methods, screen recording tools, or input method details, this is still something you should verify before upgrading.&lt;/p&gt;
&lt;h2 id=&#34;5-biggest-change-4-linux-kernel-70-and-the-lower-stack-move-forward-together&#34;&gt;5. Biggest change #4: Linux kernel 7.0 and the lower stack move forward together
&lt;/h2&gt;&lt;p&gt;The GA generic stack in &lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt; moves from &lt;code&gt;Linux 6.8&lt;/code&gt; to &lt;code&gt;Linux 7.0&lt;/code&gt;, and the HWE stack is also unified on &lt;code&gt;7.0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Among the lower-level changes highlighted by Ubuntu, the most relevant ones for general users and operators are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Crash dump is enabled by default on both desktop and server&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sched_ext&lt;/code&gt; introduces a new scheduler extension model that lets developers implement scheduling policies with eBPF&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;linux-lowlatency&lt;/code&gt; binary package is being retired, replaced by &lt;code&gt;linux-generic&lt;/code&gt; plus the user-space &lt;code&gt;lowlatency-kernel&lt;/code&gt; package for low-latency tuning&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;amd64v3&lt;/code&gt; architecture variant is available as an option, but still opt-in by default&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your machine is relatively new, &lt;code&gt;amd64v3&lt;/code&gt; is worth keeping an eye on. The official notes give this enablement method:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;APT::Architecture-Variants &amp;#34;amd64v3&amp;#34;;&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sudo tee /etc/apt/apt.conf.d/99enable-amd64v3
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt upgrade
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That said, it is not enabled automatically. Ubuntu is still prioritizing compatibility first.&lt;/p&gt;
&lt;h2 id=&#34;6-hardware-requirements-and-install-baseline&#34;&gt;6. Hardware requirements and install baseline
&lt;/h2&gt;&lt;p&gt;The official recommended baseline for Ubuntu Desktop 26.04 LTS is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;2 GHz&lt;/code&gt; dual-core processor or better&lt;/li&gt;
&lt;li&gt;At least &lt;code&gt;6 GB RAM&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;At least &lt;code&gt;25 GB&lt;/code&gt; of available storage&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your machine is on the lighter side, the official recommendation is to consider Ubuntu flavors such as &lt;code&gt;Xubuntu&lt;/code&gt; or &lt;code&gt;Lubuntu&lt;/code&gt;.&lt;br&gt;
The server edition has a lower floor. The documentation notes it can start from &lt;code&gt;1.5 GB RAM&lt;/code&gt; and &lt;code&gt;4 GB&lt;/code&gt; of storage, though the real requirement still depends on your workload.&lt;/p&gt;
&lt;h2 id=&#34;7-who-should-prioritize-upgrading&#34;&gt;7. Who should prioritize upgrading
&lt;/h2&gt;&lt;p&gt;If you are already on &lt;code&gt;24.04 LTS&lt;/code&gt; and want the following, &lt;code&gt;26.04 LTS&lt;/code&gt; is worth a close look:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A full-generation desktop stack refresh instead of minor patching&lt;/li&gt;
&lt;li&gt;More mature &lt;code&gt;Wayland&lt;/code&gt; and display support&lt;/li&gt;
&lt;li&gt;A more up-to-date default application set&lt;/li&gt;
&lt;li&gt;A newer kernel with a longer support runway&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But if you still depend heavily on older &lt;code&gt;X11&lt;/code&gt; workflows, special drivers, or custom desktop extensions, or if your production environment is extremely conservative about changes, it is still best to do a compatibility pass before upgrading.&lt;/p&gt;
&lt;h2 id=&#34;8-one-line-summary&#34;&gt;8. One-line summary
&lt;/h2&gt;&lt;p&gt;The value of &lt;code&gt;Ubuntu 26.04 LTS&lt;/code&gt; is not one especially flashy headline feature. It is that Ubuntu has rolled two years of desktop, kernel, application, and compatibility progress into a new LTS baseline all at once.&lt;/p&gt;
&lt;p&gt;If you want the shortest possible judgment, it is this: &lt;strong&gt;this is an Ubuntu LTS release that feels broadly newer and more stable as a whole, rather than one built around a single standout feature.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;related-links&#34;&gt;Related links
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Official release notes: &lt;code&gt;https://documentation.ubuntu.com/release-notes/26.04/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Summary for LTS users: &lt;code&gt;https://documentation.ubuntu.com/release-notes/26.04/summary-for-lts-users/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Understanding the nftables Framework: Tables, Chains, Rules, and Sets</title>
        <link>https://knightli.com/en/2026/04/18/nftables-framework-concepts/</link>
        <pubDate>Sat, 18 Apr 2026 10:31:12 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/18/nftables-framework-concepts/</guid>
        <description>&lt;p&gt;When learning &lt;code&gt;nftables&lt;/code&gt;, it is easy to start with command details: how to add a rule, how to delete a handle, or how to write a port match. Commands matter, but if you understand the framework first, reading rules, troubleshooting, and designing rule sets become much easier.&lt;/p&gt;
&lt;p&gt;You can think of nftables as a layered structure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;table&lt;/code&gt; isolates rule namespaces.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;family&lt;/code&gt; decides which network protocols the rules apply to.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;chain&lt;/code&gt; decides at which stage rules are executed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rule&lt;/code&gt; defines the actual match and action.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, and &lt;code&gt;verdict map&lt;/code&gt; reduce repeated rules and make rule sets easier to maintain.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following sections explain these concepts layer by layer.&lt;/p&gt;
&lt;h2 id=&#34;table-rule-namespace&#34;&gt;table: Rule Namespace
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;table&lt;/code&gt; is the outermost rule container in nftables. Different tables are isolated from each other, so a common practice is to put related rules into the same table.&lt;/p&gt;
&lt;p&gt;For example, you can separate filtering rules, NAT rules, or custom testing rules. This keeps boundaries clear: when debugging, you know which group of rules you are changing; when cleaning up, you are less likely to delete unrelated content by mistake.&lt;/p&gt;
&lt;p&gt;A table itself does not directly process packets. The chain and rule objects inside the table are what actually participate in packet processing.&lt;/p&gt;
&lt;h2 id=&#34;family-which-protocols-the-rules-apply-to&#34;&gt;family: Which Protocols the Rules Apply To
&lt;/h2&gt;&lt;p&gt;When creating a table, you need to choose a &lt;code&gt;family&lt;/code&gt;. It determines what kind of packets the rules in the table apply to.&lt;/p&gt;
&lt;p&gt;Common families can be understood this way:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ip&lt;/code&gt;: handles IPv4 only.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ip6&lt;/code&gt;: handles IPv6 only.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;inet&lt;/code&gt;: handles both IPv4 and IPv6.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;arp&lt;/code&gt;: handles ARP.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bridge&lt;/code&gt;: handles bridge-layer traffic.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;netdev&lt;/code&gt;: closer to the network device ingress path, suitable for handling traffic at an earlier stage.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For ordinary firewall rules, &lt;code&gt;inet&lt;/code&gt; is commonly used. It lets you keep IPv4 and IPv6 rules in the same table and avoids maintaining two similar rule structures.&lt;/p&gt;
&lt;h2 id=&#34;chain-where-rules-are-executed&#34;&gt;chain: Where Rules Are Executed
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;chain&lt;/code&gt; is a list of rules. After a packet enters a hook, it passes through the rules in the chain in order.&lt;/p&gt;
&lt;p&gt;Chains can roughly be divided into two types:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Base chain: attached to a hook in the kernel network path and actively called by the packet flow.&lt;/li&gt;
&lt;li&gt;Regular chain: not directly attached to a hook; it must be called by jumps from other rules.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A base chain usually specifies several key properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;type&lt;/code&gt;: the purpose of the chain, such as &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;nat&lt;/code&gt;, or &lt;code&gt;route&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hook&lt;/code&gt;: the processing stage, such as &lt;code&gt;prerouting&lt;/code&gt;, &lt;code&gt;input&lt;/code&gt;, &lt;code&gt;forward&lt;/code&gt;, &lt;code&gt;output&lt;/code&gt;, or &lt;code&gt;postrouting&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;priority&lt;/code&gt;: when multiple chains exist on the same hook, this decides which runs first.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;policy&lt;/code&gt;: the default action when no rule matches, commonly &lt;code&gt;accept&lt;/code&gt; or &lt;code&gt;drop&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key point is that rules do not take effect just anywhere. The same rule has completely different meaning when placed in &lt;code&gt;input&lt;/code&gt;, &lt;code&gt;forward&lt;/code&gt;, or &lt;code&gt;output&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;rule-match-conditions-plus-actions&#34;&gt;rule: Match Conditions Plus Actions
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;rule&lt;/code&gt; is where nftables actually makes decisions. It usually consists of two parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Match conditions: source IP, destination IP, protocol, port, interface, connection state, and so on.&lt;/li&gt;
&lt;li&gt;Actions: &lt;code&gt;accept&lt;/code&gt;, &lt;code&gt;drop&lt;/code&gt;, &lt;code&gt;reject&lt;/code&gt;, &lt;code&gt;counter&lt;/code&gt;, &lt;code&gt;jump&lt;/code&gt;, &lt;code&gt;return&lt;/code&gt;, and so on.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Rules are evaluated in order. After a packet matches an action that terminates processing, subsequent rules are no longer evaluated. If nothing matches, evaluation continues until the chain ends or the default policy is triggered.&lt;/p&gt;
&lt;p&gt;This is why rule order matters: more specific rules usually need to appear before broader rules, otherwise they may never get a chance to run.&lt;/p&gt;
&lt;h2 id=&#34;set-group-values-together&#34;&gt;set: Group Values Together
&lt;/h2&gt;&lt;p&gt;If you need to match many IP addresses, ports, or interfaces, writing many separate rules becomes hard to maintain. &lt;code&gt;set&lt;/code&gt; lets you manage a group of values of the same type in one place.&lt;/p&gt;
&lt;p&gt;For example, a group of trusted IPs, a group of blocked ports, or a group of addresses that need rate limiting can all be stored in a set. The rule only needs to check whether a value belongs to that set.&lt;/p&gt;
&lt;p&gt;The benefits of set are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fewer rules.&lt;/li&gt;
&lt;li&gt;Better readability.&lt;/li&gt;
&lt;li&gt;Easier element additions and removals later.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a rule set contains many repeated conditions, it is usually time to consider set.&lt;/p&gt;
&lt;h2 id=&#34;map-map-a-matched-value-to-a-result&#34;&gt;map: Map a Matched Value to a Result
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;map&lt;/code&gt; can be understood as a lookup table. It returns a result based on an input value.&lt;/p&gt;
&lt;p&gt;For example, different ports can map to different marks, or different addresses can map to different processing parameters. Compared with writing many if/else-style rules, map is more centralized and easier to maintain.&lt;/p&gt;
&lt;p&gt;set answers &amp;ldquo;is this value in the collection&amp;rdquo;; map answers &amp;ldquo;what result corresponds to this value&amp;rdquo;.&lt;/p&gt;
&lt;h2 id=&#34;verdict-map-map-a-matched-value-to-an-action&#34;&gt;verdict map: Map a Matched Value to an Action
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;verdict map&lt;/code&gt; is an important use of map: it maps a matched value to a verdict, which means a rule action.&lt;/p&gt;
&lt;p&gt;For example, different IP ranges can correspond to &lt;code&gt;accept&lt;/code&gt;, &lt;code&gt;drop&lt;/code&gt;, or jumps to different chains. This can compress many branches into one structure.&lt;/p&gt;
&lt;p&gt;When a rule set grows more complex, verdict map is very useful. It reduces repeated rules and expresses policy more like a table rather than a long list of conditional statements.&lt;/p&gt;
&lt;h2 id=&#34;designing-rules-from-the-concepts&#34;&gt;Designing Rules from the Concepts
&lt;/h2&gt;&lt;p&gt;When designing nftables rules, you can think in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First decide which &lt;code&gt;family&lt;/code&gt; the rules belong to.&lt;/li&gt;
&lt;li&gt;Then decide which &lt;code&gt;table&lt;/code&gt; they should go into.&lt;/li&gt;
&lt;li&gt;Choose the proper &lt;code&gt;hook&lt;/code&gt; and &lt;code&gt;chain&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Write the concrete &lt;code&gt;rule&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If there are many repeated conditions, introduce &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, or &lt;code&gt;verdict map&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Rules written this way are easier to maintain and easier to troubleshoot.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;nftables concepts are not complicated, but the hierarchy matters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;table defines rule boundaries.&lt;/li&gt;
&lt;li&gt;family defines protocol scope.&lt;/li&gt;
&lt;li&gt;chain defines execution position.&lt;/li&gt;
&lt;li&gt;rule defines matching and action.&lt;/li&gt;
&lt;li&gt;set, map, and verdict map manage complexity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Understand these concepts first, then look at concrete commands. That is more reliable than memorizing commands directly. Especially after a rule set grows, clear concepts help you determine whether a problem is in protocol scope, execution stage, rule order, or the match condition itself.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.redhat.com/zh-cn/documentation/red_hat_enterprise_linux/10/html/configuring_firewalls_and_packet_filters/concepts-in-the-nftables-framework&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://docs.redhat.com/zh-cn/documentation/red_hat_enterprise_linux/10/html/configuring_firewalls_and_packet_filters/concepts-in-the-nftables-framework&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>nftables Quick Start: Tables, Chains, Rules, and Common Operations</title>
        <link>https://knightli.com/en/2026/04/18/nftables-quick-start/</link>
        <pubDate>Sat, 18 Apr 2026 10:22:07 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/18/nftables-quick-start/</guid>
        <description>&lt;p&gt;&lt;code&gt;nftables&lt;/code&gt; is a common packet filtering and firewall rule management tool on Linux. If you only need device access control, traffic counters, port matching, or basic rate limiting, you do not need to learn the entire rule system at once. Start with three concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;table&lt;/code&gt;: a container for rules.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;chain&lt;/code&gt;: where rules are evaluated, usually attached to a hook.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rule&lt;/code&gt;: the actual matching condition and action.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This article outlines a minimal workflow that is suitable for testing first in a safe environment.&lt;/p&gt;
&lt;h2 id=&#34;basic-structure&#34;&gt;Basic Structure
&lt;/h2&gt;&lt;p&gt;Prepare a few variables first. The following commands reuse them:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;customtable
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;chain&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;custom_control
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;drop
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;ip&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;192.168.18.251
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;mac&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;00:00:01:02:03:04
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Create an &lt;code&gt;inet&lt;/code&gt; table that supports both IPv4 and IPv6:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add table inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then create a chain attached to the &lt;code&gt;forward&lt;/code&gt; stage:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add chain inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;type&lt;/span&gt; filter hook forward priority 0&lt;span class=&#34;se&#34;&gt;\;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Here, &lt;code&gt;type filter&lt;/code&gt; means this is a filtering rule chain, and &lt;code&gt;hook forward&lt;/code&gt; means it processes forwarded packets.&lt;/p&gt;
&lt;h2 id=&#34;common-matching-methods&#34;&gt;Common Matching Methods
&lt;/h2&gt;&lt;p&gt;Match by source IP. This is usually useful for the upload direction:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; ip saddr &lt;span class=&#34;nv&#34;&gt;$ip&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$target&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Match by destination IP. This is usually useful for the download direction:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; ip daddr &lt;span class=&#34;nv&#34;&gt;$ip&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$target&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;When matching by MAC address, &lt;code&gt;ether saddr&lt;/code&gt; can be used to control upstream traffic:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; ether saddr &lt;span class=&#34;nv&#34;&gt;$mac&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$target&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Note that in networks involving bridging, forwarding, or address translation, downstream packets may not always be reliably filtered by destination MAC. For device access control, start by validating &lt;code&gt;ether saddr&lt;/code&gt; or IP-based rules first.&lt;/p&gt;
&lt;p&gt;To match ports, you can cover both TCP and UDP:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; tcp, udp &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt; dport &lt;span class=&#34;m&#34;&gt;22&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$target&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To match a port range, use a comparison expression:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; tcp dport &lt;span class=&#34;se&#34;&gt;\&amp;gt;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1024&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$target&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;count-traffic-for-one-device&#34;&gt;Count Traffic for One Device
&lt;/h2&gt;&lt;p&gt;If you only want to count upload and download traffic for an IP address, use &lt;code&gt;counter return&lt;/code&gt;. After a match, it records the counter and returns, which can reduce further matching overhead when more statistic rules exist later.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; ip saddr &lt;span class=&#34;nv&#34;&gt;$ip&lt;/span&gt; counter &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; ip daddr &lt;span class=&#34;nv&#34;&gt;$ip&lt;/span&gt; counter &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;View the statistics:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft list chain inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you need to see the &lt;code&gt;handle&lt;/code&gt; for each rule, add &lt;code&gt;-a&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft -a list chain inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;handle&lt;/code&gt; is important because nftables usually relies on it to delete a single rule.&lt;/p&gt;
&lt;h2 id=&#34;basic-rate-limiting&#34;&gt;Basic Rate Limiting
&lt;/h2&gt;&lt;p&gt;Rate limiting can be done with &lt;code&gt;limit rate over&lt;/code&gt;. For example, limit traffic over a specified rate by MAC address:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;rate&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;unit&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;mbytes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft add rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; ether saddr &lt;span class=&#34;nv&#34;&gt;$mac&lt;/span&gt; limit rate over &lt;span class=&#34;nv&#34;&gt;$rate&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$unit&lt;/span&gt;/second drop
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Here, &lt;code&gt;mbytes&lt;/code&gt; and &lt;code&gt;kbytes&lt;/code&gt; can be understood as the usual M and K units. You do not need to manually multiply by 8. In practice, start with a more relaxed value, confirm the matching direction and effect, then tighten it if needed.&lt;/p&gt;
&lt;h2 id=&#34;delete-and-clean-up-rules&#34;&gt;Delete and Clean Up Rules
&lt;/h2&gt;&lt;p&gt;First list rules with &lt;code&gt;handle&lt;/code&gt; values:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft -a list chain inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then delete a rule by handle:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft delete rule inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt; handle &amp;lt;handle&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Flush a chain:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft flush chain inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Delete a chain:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft delete chain inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$chain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Delete the entire table:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nft delete table inet &lt;span class=&#34;nv&#34;&gt;$table&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;During daily debugging, only clean up the table you created yourself. Avoid directly changing tables automatically generated by the system or other services. This makes rollback easier even if a rule is written incorrectly.&lt;/p&gt;
&lt;h2 id=&#34;usage-notes&#34;&gt;Usage Notes
&lt;/h2&gt;&lt;p&gt;When using nftables, it is often safer to create your own independent table and chain first. This has two benefits:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Your rules are less likely to mix with existing system rules.&lt;/li&gt;
&lt;li&gt;Debugging, flushing, and deletion are safer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After writing rules, always use &lt;code&gt;nft list chain&lt;/code&gt; to check actual matching behavior. MAC, interface, port, and rate-limit rules may behave differently across devices, bridge setups, and system versions. Small-scope testing is safer than writing complex rules all at once.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.right.com.cn/forum/thread-8369750-1-1.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.right.com.cn/forum/thread-8369750-1-1.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>Ollama Default Model Storage Path and Migration Guide (Avoid Filling Up C Drive)</title>
        <link>https://knightli.com/en/2026/04/06/ollama-model-storage-path-and-migration/</link>
        <pubDate>Mon, 06 Apr 2026 09:38:00 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/06/ollama-model-storage-path-and-migration/</guid>
        <description>&lt;p&gt;When running local LLMs, the system drive is often the first thing to run out of space. Ollama stores models in user or system directories by default, so your C drive can fill up quickly without path planning.&lt;/p&gt;
&lt;h2 id=&#34;common-default-ollama-model-directories&#34;&gt;Common Default Ollama Model Directories
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Windows: &lt;code&gt;C:\Users\&amp;lt;username&amp;gt;\.ollama\models&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;macOS: &lt;code&gt;~/.ollama/models&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Linux: &lt;code&gt;/usr/share/ollama/.ollama/models&lt;/code&gt; (may vary by installation method)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;windows-move-the-model-directory-to-a-non-system-drive&#34;&gt;Windows: Move the Model Directory to a Non-System Drive
&lt;/h2&gt;&lt;p&gt;A practical choice is moving model storage to a path like &lt;code&gt;D:\OllamaModels&lt;/code&gt;. The key is setting the &lt;code&gt;OLLAMA_MODELS&lt;/code&gt; system environment variable.&lt;/p&gt;
&lt;h2 id=&#34;1-create-the-target-directory&#34;&gt;1. Create the Target Directory
&lt;/h2&gt;&lt;p&gt;For example, create: &lt;code&gt;D:\OllamaModels&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;2-configure-the-system-environment-variable&#34;&gt;2. Configure the System Environment Variable
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Variable name: &lt;code&gt;OLLAMA_MODELS&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Variable value: &lt;code&gt;D:\OllamaModels&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can set it in &amp;ldquo;System Properties -&amp;gt; Advanced -&amp;gt; Environment Variables&amp;rdquo;, or with an admin PowerShell command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;System.Environment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;OLLAMA_MODELS&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;D:\OllamaModels&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Machine&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;3-restart-ollama-or-reboot-the-system&#34;&gt;3. Restart Ollama (or Reboot the System)
&lt;/h2&gt;&lt;p&gt;After setting the variable, restart the Ollama service/app. If you&amp;rsquo;re unsure whether it has taken effect, rebooting the PC is the most reliable option.&lt;/p&gt;
&lt;h2 id=&#34;4-verify-the-new-path-is-active&#34;&gt;4. Verify the New Path Is Active
&lt;/h2&gt;&lt;p&gt;Pull any model and check whether new files appear under &lt;code&gt;D:\OllamaModels&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;5-clean-up-the-old-directory-after-confirmation&#34;&gt;5. Clean Up the Old Directory (After Confirmation)
&lt;/h2&gt;&lt;p&gt;Once models work correctly in the new location, remove old files to reclaim C drive space.&lt;/p&gt;
&lt;h2 id=&#34;faq&#34;&gt;FAQ
&lt;/h2&gt;&lt;h3 id=&#34;still-writing-to-c-drive-after-configuration&#34;&gt;Still Writing to C Drive After Configuration
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;Confirm the variable is a system variable, not a temporary session variable.&lt;/li&gt;
&lt;li&gt;Confirm the Ollama process was restarted.&lt;/li&gt;
&lt;li&gt;Verify the variable name is exactly &lt;code&gt;OLLAMA_MODELS&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;do-i-need-to-migrate-existing-model-files&#34;&gt;Do I Need to Migrate Existing Model Files
&lt;/h3&gt;&lt;p&gt;If you want to avoid re-downloading, stop Ollama, copy existing model files to the new directory, then restart Ollama and verify.&lt;/p&gt;
&lt;!-- ollama-related-links:start --&gt;
&lt;h2 id=&#34;related-posts&#34;&gt;Related Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/05/google-gemma-4-model-comparison/&#34; &gt;Gemma 4 Model Comparison and Selection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/05/llm-quantization-guide-fp16-q4-q2/&#34; &gt;LLM Quantization Guide (FP16/Q8/Q5/Q4/Q2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/06/uninstall-ollama-on-linux/&#34; &gt;Completely Uninstall Ollama on Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/06/check-ollama-model-loaded-on-gpu/&#34; &gt;How to Check Whether Ollama Uses GPU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- ollama-related-links:end --&gt;
</description>
        </item>
        <item>
        <title>Completely Uninstall Ollama on Linux (Including Leftover Cleanup)</title>
        <link>https://knightli.com/en/2026/04/06/uninstall-ollama-on-linux/</link>
        <pubDate>Mon, 06 Apr 2026 09:16:29 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/06/uninstall-ollama-on-linux/</guid>
        <description>&lt;p&gt;If you need to remove Ollama completely from Linux, follow the steps below in order. This guide cleans up the service, executable, model directory, and the &lt;code&gt;ollama&lt;/code&gt; user/group.&lt;/p&gt;
&lt;h2 id=&#34;before-you-uninstall&#34;&gt;Before You Uninstall
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;The commands below will delete local Ollama model files (usually in &lt;code&gt;/usr/share/ollama&lt;/code&gt;). Back up first if needed.&lt;/li&gt;
&lt;li&gt;These commands use &lt;code&gt;sudo&lt;/code&gt; by default. Make sure your account has administrator privileges.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;1-stop-and-remove-the-systemd-service&#34;&gt;1. Stop and Remove the systemd Service
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl stop ollama
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl disable ollama
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rm -f /etc/systemd/system/ollama.service
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl daemon-reload
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;2-remove-the-ollama-binary&#34;&gt;2. Remove the Ollama Binary
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;OLLAMA_BIN&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; -v ollama&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; -n &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OLLAMA_BIN&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  sudo rm -f &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OLLAMA_BIN&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;3-remove-ollama-library-directories-if-present&#34;&gt;3. Remove Ollama Library Directories (If Present)
&lt;/h2&gt;&lt;p&gt;If your installation wrote Ollama files into a &lt;code&gt;lib&lt;/code&gt; directory, clean them up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; d in /usr/local/lib/ollama /usr/lib/ollama /lib/ollama&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; -d &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$d&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo rm -rf &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$d&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;4-remove-model-and-data-directory&#34;&gt;4. Remove Model and Data Directory
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo rm -rf /usr/share/ollama
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;5-remove-system-user-and-group-if-present&#34;&gt;5. Remove System User and Group (If Present)
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;id -u ollama &amp;gt;/dev/null 2&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo userdel ollama
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;getent group ollama &amp;gt;/dev/null 2&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo groupdel ollama
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;6-verify-uninstall-completion&#34;&gt;6. Verify Uninstall Completion
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; -v ollama &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;ollama binary not found&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;systemctl status ollama &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If &lt;code&gt;ollama&lt;/code&gt; is no longer found in the checks above, the uninstall is complete.&lt;/p&gt;
&lt;!-- ollama-related-links:start --&gt;
&lt;h2 id=&#34;related-posts&#34;&gt;Related Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/05/google-gemma-4-model-comparison/&#34; &gt;Gemma 4 Model Comparison and Selection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/05/llm-quantization-guide-fp16-q4-q2/&#34; &gt;LLM Quantization Guide (FP16/Q8/Q5/Q4/Q2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/06/ollama-model-storage-path-and-migration/&#34; &gt;Ollama Model Storage Path and Migration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/04/06/check-ollama-model-loaded-on-gpu/&#34; &gt;How to Check Whether Ollama Uses GPU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- ollama-related-links:end --&gt;
</description>
        </item>
        <item>
        <title>rsync --delete Explained and Practical Directory Cleanup</title>
        <link>https://knightli.com/en/2026/03/29/rsync-delete-explained/</link>
        <pubDate>Sun, 29 Mar 2026 11:00:00 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/03/29/rsync-delete-explained/</guid>
        <description>&lt;p&gt;The core purpose of &lt;code&gt;rsync --delete&lt;/code&gt; is to remove files in the target directory that do not exist in the source directory, so both sides stay consistent.&lt;/p&gt;
&lt;p&gt;Typical use cases include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cleaning stale files on the target side during sync&lt;/li&gt;
&lt;li&gt;Quickly emptying a target directory by syncing from an empty source directory&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;basic-syntax&#34;&gt;Basic Syntax
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rsync -a --delete source_dir/ target_dir/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-a&lt;/code&gt;: archive mode, preserves permissions, timestamps, and other attributes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--delete&lt;/code&gt;: removes extra files on the target side&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Important note: whether &lt;code&gt;source_dir&lt;/code&gt; ends with &lt;code&gt;/&lt;/code&gt; changes behavior. With &lt;code&gt;/&lt;/code&gt;, rsync syncs directory contents; without &lt;code&gt;/&lt;/code&gt;, it syncs the directory itself.&lt;/p&gt;
&lt;h2 id=&#34;quickly-empty-a-target-directory-with-an-empty-source&#34;&gt;Quickly Empty a Target Directory with an Empty Source
&lt;/h2&gt;&lt;p&gt;If your goal is to keep the directory path but clear all contents, use an empty directory as the source:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 1) Create an empty directory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir -p /tmp/empty_dir
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 2) Sync and delete target-side content&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rsync -a --delete /tmp/empty_dir/ /path/to/target_dir/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In large-directory scenarios, this is often more efficient than deleting files one by one, and it is easier to automate in scripts.&lt;/p&gt;
&lt;h2 id=&#34;common-extended-options&#34;&gt;Common Extended Options
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--delete-before&lt;/code&gt;: delete before transfer, which can be faster in some cases&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--progress&lt;/code&gt;: show transfer and processing progress&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example (cleaning an Nginx log directory):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rsync -a --delete --progress /tmp/empty_dir/ /var/log/nginx/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;recommendations&#34;&gt;Recommendations
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Run with &lt;code&gt;--dry-run&lt;/code&gt; first to verify the deletion scope&lt;/li&gt;
&lt;li&gt;Back up the target directory before running in production&lt;/li&gt;
&lt;li&gt;For critical paths, schedule execution during off-peak hours&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>How Git Tracks File Executable Permission (&#43;x)</title>
        <link>https://knightli.com/en/2026/03/29/git-executable-permission-x/</link>
        <pubDate>Sun, 29 Mar 2026 10:00:00 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/03/29/git-executable-permission-x/</guid>
        <description>&lt;p&gt;In a Linux environment, Git tracks a file&amp;rsquo;s executable bit (&lt;code&gt;+x&lt;/code&gt;).
If you want a script to be preserved as an executable file in the repository, you need to explicitly record that permission change in Git.&lt;/p&gt;
&lt;h2 id=&#34;add-executable-permission-to-a-file&#34;&gt;Add Executable Permission to a File
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git update-index --chmod&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;+x script.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;chore: mark script.sh as executable&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This command stages the executable-bit change for &lt;code&gt;script.sh&lt;/code&gt;. After you commit and push, other users will keep the same permission state when they pull or clone the repository.&lt;/p&gt;
&lt;h2 id=&#34;remove-executable-permission-from-a-file&#34;&gt;Remove Executable Permission from a File
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git update-index --chmod&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;-x script.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;chore: remove executable bit from script.sh&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;verify-the-result&#34;&gt;Verify the Result
&lt;/h2&gt;&lt;p&gt;Use the following commands to check file permissions in your working tree:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone xxxxxxxxxxxxxxx
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ls -l script.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you see something like &lt;code&gt;-rwxr-xr-x&lt;/code&gt;, the file is executable. If you see &lt;code&gt;-rw-r--r--&lt;/code&gt;, it is not executable.&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git update-index --chmod=+x/-x&lt;/code&gt; only updates the file mode recorded by Git; it does not replace changes to file content.&lt;/li&gt;
&lt;li&gt;In team workflows, it is best to commit permission-only changes separately for easier review and tracking.&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
