Using swap partitions with util-linux: mkswap, swapon and swapoff, and swapfiles

Introduction

Introduction

can use swap file or swap partition

mount swap:

+ need spare partition in partition table

mkswap /dev/<swap_partition>
swapon /dev/swap_partition

/etc/fstab

fstab

Can add entry into /etc/fstab.

Eg:

UUID=device_UUID none swap defaults 0 0

swapfiles

Introduction