Mkswap

From LQWiki
Jump to: navigation, search

mkswap is the command used to format a file or partition for use as swap space.


Usage

Format an existing file or partition for use as swap space

 mkswap [-v] <target>
 

Enable a swap area

 swapon [-v] <target>

Disable a swap area

 swapoff [-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] package

See also