Swapoff

From LQWiki
Jump to navigation Jump to search

swapoff is the command used to turn off swap for a particular swap partition or file.


Usage

Disable a swap area

 swapoff [-v] <target>

Enable a swap area

 swapon [-v] <target>

Enable all swap areas mentioned in /etc/fstab

 swapon -a [-v]


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] project.

See also