From LQWiki
Jump to navigation Jump to search

swapon is the command used to show active swap areas, or activate a swap area (file or partition.)


Enable a swap area

 swapon [-v] <target>

Enable all swap areas mentioned in /etc/fstab

 swapon -a [-v]

Disable a swap area

 swapoff [-v] <target>

Show active swap areas

 swapon -s [-v]

where the target is a swap file or partition

Provided by

Most (all?) Linux distributions incorporate this from the util-linux package

See also