is used to specify devices on which paging and swapping are to take place.
The device or file used is given by the
parameter. It may be of the form
to indicate a device by label or uuid.
normally occur in the system boot scripts making all swap devices available, so
that the paging and swapping activity is interleaved across several devices and
disables swapping on the specified devices and files.
flag is given, swapping is disabled on all known swap devices and files
(as found in
are made available, except for those with the “noauto” option.
Devices that are already being used as swap are silently skipped.
initializes the whole device and does not check for bad blocks.
(For this, access to
is a value between 0 and 32767. Higher numbers indicate higher
for a full description of swap priorities. Add
to the option field of
for use with
You should not use
on a file with holes.
Swap over NFS may not work.
automatically detects and rewrites swap space signature with old software
suspend data (e.g S1SUSPEND, S2SUSPEND, …). The problem is that if we don’t
do it, then we get data corruption the next time an attempt at unsuspending is
standard paging devices
The swapon command is part of the util-linux-ng package and is available from