swapoff

Disables device or file for swapping. More information: <https://manned.org/swapoff>.

Install

All systems
curl cmd.cat/swapoff.sh
Debian Debian
apt-get install mount
Ubuntu
apt-get install mount
Alpine
apk add util-linux
Arch Arch Linux
pacman -S util-linux
image/svg+xml Kali Linux
apt-get install mount
CentOS
yum install util-linux
Fedora
dnf install util-linux
Windows (WSL2)
sudo apt-get update sudo apt-get install mount
OS X
brew install util-linux
Raspbian
apt-get install mount
Docker
docker run cmd.cat/swapoff swapoff powered by Commando

Disables device or file for swapping. More information: <https://manned.org/swapoff>.

  • Disable a given swap partition:
    swapoff /dev/sdb7
  • Disable a given swap file:
    swapoff path/to/file
  • Disable all swap areas:
    swapoff -a
  • Disable swap by label of a device or file:
    swapoff -L swap1

© tl;dr; authors and contributors