Arch Linux – swapon / swapoff – ala “The Karate Kid”

arch-apple_logoList active swap partitions:

swapon -s

Turn off swap from existing swap partition:

sudo swapoff [mount point - eg. /dev/sdc4]

Add / activate swap partition:

sudo swapon [mount point - eg. /dev/sda4]

Auto swapon at boot by editing fstab:

sudo nano /etc/fstab

Comment out any existing (unwanted) swap entries, and add:

/dev/sda4 none swap defaults 0 0