Most Popular
Recently Added
Recently Updated

Linux Swap

  • For a partition:

  • Format the new partition with mkswap /dev/sdx1

  • Add the new swap partition to /etc/fstab.

  • Run swapon -a to activate the new swap.

  • To add a swap file:

  • Create the file. This command creates a 1 gigabyte file: dd if=/dev/zero of=/swap bs=1M count=1000

  • Format the swap file: mkswap /swap

  • Add the new swap file to /etc/fstab: /swap swap swap defaults 0 0

  • Run swapon -a to activate the new swap.


Properties ID: 000069   Views: 134   Updated: 1 month ago
Filed under: