Install Swapon On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS
Install swapon
-
Debian
apt-get install mountClick to copy -
Ubuntu
apt-get install mountClick to copy -
Alpine OS
apk add util-linuxClick to copy -
Arch Linux
pacman -S util-linuxClick to copy -
Kali Linux
apt-get install mountClick to copy -
CentOS
yum install util-linuxClick to copy -
Fedora
dnf install util-linuxClick to copy -
Raspbian
apt-get install loop-aes-utilsClick to copy -
macOS
brew install util-linuxClick 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 -sClick to copyEnable a given swap partition:swapon /dev/sdb7Click to copyEnable a given swap file:swapon path/to/fileClick to copyEnable all swap areas:swapon -aClick to copyEnable swap by label of a device or file:swapon -L swap1Click 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.




