echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
Persist a low swappiness setting
Appends vm.swappiness=10 to /etc/sysctl.conf so the kernel keeps a calm 10% preference for swap (swappiness is the 0-100 eagerness to swap; servers often prefer 10 over the default 60). tee -a writes the echoed line with root privileges, appending without touching existing content. The value takes effect after sudo sysctl --system or a reboot.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.