Install Swapon On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS
Install swapon
-
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 loop-aes-utils
Click to copy -
macOS
brew install util-linux
Click to copy
Enables device or file for swapping.
How to use swapon?
Below are few example commands for swapon that you can use in the terminal.
Get swap information:swapon -s
Click to copyEnable a given swap partition:swapon /dev/sdb7
Click to copyEnable a given swap file:swapon path/to/file
Click to copyEnable all swap areas:swapon -a
Click to copyEnable swap by label of a device or file:swapon -L swap1
Click to copy
Install the latest version of swapon in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the swapon just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of swapon from the respository and install it in your computer/server.