How To Install Swapoff On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?
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/sdb7
Click to copyDisable a given swap file:swapoff path/to/file
Click to copyDisable all swap areas:swapoff -a
Click to copyDisable swap by label of a device or file:swapoff -L swap1
Click 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 2024 latest package from the repository and install it in your computer/server.