swapoff

How To Install Swapoff On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Swapoff On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

swapoff

Disables device or file for swapping.

Maintainer: LaMont Jones


Section: admin

Install swapoff

  • Debian apt-get install mount Click to copy
  • Ubuntu apt-get install mount Click to copy
  • Alpine OS apk add util-linux Click to copy
  • Arch Linux pacman -S util-linux Click to copy
  • Kali Linux apt-get install mount Click to copy
  • CentOS yum install util-linux Click to copy
  • Fedora dnf install util-linux Click to copy
  • Raspbian apt-get install mount Click to copy
  • macOS brew install util-linux Click to copy

Disables device or file for swapping.

How to use swapoff?

Below are few example commands for swapoff that you can use in the terminal.

Disable a given swap partition:
swapoff /dev/sdb7Click to copy
Disable a given swap file:
swapoff path/to/fileClick to copy
Disable all swap areas:
swapoff -aClick to copy
Disable swap by label of a device or file:
swapoff -L swap1Click to copy
Installation of latest swapoff command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2023 latest package from the repository and install it in your computer/server.